]> xenbits.xensource.com Git - libvirt.git/commitdiff
bash-completion: Run virsh/virt-admin in quiet mode
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 23 May 2024 13:41:16 +0000 (15:41 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 28 May 2024 06:51:45 +0000 (08:51 +0200)
In some cases (e.g. when virt-admin connects to the default URI)
some info message is printed onto stdout (using vshPrintExtra()).
This hurts user experience, just consider:

  virt-admin<TAB><TAB>
  NOTE\:\ Connecting\ to\ default\ daemon.\ Specify\ daemon\ using\ -c\ \(e.g.\ virtqemud\:///system\)

when no daemon is running. Suppress extra prints by passing '-q'
in the bash-completion script.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
tools/bash-completion/vsh.in

index 897f74cc0863c402c4aaee91a5beff2b34d9b989..5692788d63c69b1cf1ae3377ebe64e0957c85b35 100644 (file)
@@ -30,7 +30,7 @@ _@command@_complete()
         c=$((++c))
     done
 
-    CMDLINE=( )
+    CMDLINE=( "-q" )
     if [ -n "${RO}" ]; then
         CMDLINE+=("-r")
     fi