On Wed, 22.04.15 11:07, Lukas Rusak (loru...@gmail.com) wrote:

> ---
>  shell-completion/zsh/_machinectl | 84 
> +++++++++++++++++++++++++++++++++-------
>  1 file changed, 70 insertions(+), 14 deletions(-)
> 
> diff --git a/shell-completion/zsh/_machinectl 
> b/shell-completion/zsh/_machinectl
> index c666b7e..2b1b7ed 100644
> --- a/shell-completion/zsh/_machinectl
> +++ b/shell-completion/zsh/_machinectl
> @@ -1,5 +1,20 @@
>  #compdef machinectl
>  
> +__get_available_machines () {
> +    ls -1 /var/lib/container |  {while read -r a b; do echo $a; done;}
> +}

Hmm, the right way to list running containers is with "machinectl
list". The right way to list container images is with "machinectl
list-images".

Just listing /var/lib/container is not right, because the we tent to
prefer /var/lib/machines now, and because we support raw images in
those dirs, which carry the ".raw" suffix which should be removed when
used as machine name.

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to