That said in Cosmic I have it all working as intented:
ubuntu@c:~$ virsh l
list lxc-enter-namespace
ubuntu@c:~$ virsh list --
--all --managed-save --persistent --state-running --title --with-managed-save --without-snapshot
--autostart --name --state-other --state-shutoff --transient --with-snapshot
--inactive --no-autostart --state-paused --table --uuid --without-managed-save
ubuntu@c:~$ virsh list --a
--all --autostart
Upstream actually has completion, and we ship it since cosmic IIRC.
From the build: bash-completion /completions
checking for BASH_COMPLETION... yes
checking for bash-completions directory... /usr/share/
configure: bash_completion: yes (CFLAGS='' LIBS='')
/usr/bin/install -c ../../. ./tools/ bash-completion /vsh \ R>>/debian/ tmp/usr/ share/bash- completion/ completions/ vsh" >/debian/ tmp/usr/ share/bash- completion/ completions && \
"/<<PKGBUILDDI
( cd /<<PKGBUILDDIR>
rm -f virsh virt-admin && \
ln -s vsh virsh && \
ln -s vsh virt-admin )
Since
libvirt (4.5.0-1) unstable; urgency=medium
* [882c646] Install bash completion (Closes: #902450)
That said in Cosmic I have it all working as intented: managed- save
ubuntu@c:~$ virsh l
list lxc-enter-namespace
ubuntu@c:~$ virsh list --
--all --managed-save --persistent --state-running --title --with-managed-save --without-snapshot
--autostart --name --state-other --state-shutoff --transient --with-snapshot
--inactive --no-autostart --state-paused --table --uuid --without-
ubuntu@c:~$ virsh list --a
--all --autostart