[systemd-devel] [PATCH 1/3] zsh-completion: add missing completions for machinectl

Lennart Poettering lennart at poettering.net
Thu Apr 23 07:44:01 PDT 2015


On Thu, 23.04.15 13:06, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:

> On Wed, Apr 22, 2015 at 12:30:32PM -0700, Lukas Rusak wrote:
> > Ah, completely missed images. So perhaps something like this would be
> > better?
> > 
> > machinectl --full --no-legend --no-pager list-images | awk '{print $1}'
> We usually try to avoid running external programs unless necessary. This
> can be implemented in pure shell which should be slightly faster.

Well, it's not that easy, since machined actually searches multiple
directories, ignores certain hidden files, drops .raw suffixes and
suchlike. Of course, you can replicate all that in shell, or you can
avoid it...

> I think you can ignore spaces for now. This is just tab completion after all,
> it doesn't have to be bullet proof, and using spaces in image names would be
> fairly exotic.

We don't support that in machined anyway.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list