Very strange situation on Slackware-current.
With libvirt-6.8.0 compiled by source.
Let start bash completion
Code:
virst st<TAB>
virsh start OK
virsh start --dom<TAB>
virsh start --domain OK
virsh start --domain <TAB>
Display all 235 possibilities? (y or n)
235 possibilities? I have only 15 domains configured and the 235 files are my files and dirs in home, seems bash completion cannot complete the domain list, the other commands (virsh domiflist, virsh dominfo, virsh domifaddr) works fine with tab completion. All expect domain list.
I have try removing all libvirt files, and reinstall libvirt but nothing...
what can block my domain bash completion?
I have tried to debug bash
Run command
Code:
virsh start --domain ce<TAB>
Code:
+ local flag_all=1 array ret a b ifaces nwfilters files
+ COMPREPLY=()
+ cur=cen
+ prev=--domain
+++ virsh -h
+++ grep '^ '
+++ cut '-d ' -f5
+++ virsh -h
+++ cut -d= -f1
+++ grep '\--'
+++ cut '-d ' -f7
++ echo '-c
-d
-e
-h
-k
-K
-l
-q
-r
-t
-v
-V
attach-device
attach-disk
...
very long list of virsh commands
cd
echo
exit
help
pwd
quit
connect' '--connect
--debug
--escape
--help
--keepalive-interval
--keepalive-count
--log
--quiet
--readonly
--timing'
+ cmds='-c
-d
-e
-h
-k
-K
-l
-q
-r
-t
-v
-V
attach-device
...
very long list of virsh commands
echo
exit
help
pwd
quit
connect --connect
--debug
--escape
--help
--keepalive-interval
--keepalive-count
--log
--quiet
--readonly
--timing'
++ virsh help
++ grep '^ '
++ cut '-d ' -f5
+ cmds_help='attach-device
attach-disk
attach-interface
autostart
blkdeviotune
blkiotune
blockcommit
...very long list of virsh commands
cd
echo
exit
help
pwd
quit
connect'
+ case "$prev" in
++ _virsh_list_domains 1
++ local flag_all=1 flags
++ '[' 1 -eq 1 ']'
++ flags=--all
++ virsh -q list --all
++ cut '-d ' -f7
++ awk '{print $1}'
+ doms=
+ COMPREPLY=($(compgen -W "$doms" -- "$cur"))
++ compgen -W '' -- cen
+ return 0