bash-completion: Run virsh/virt-admin in quiet mode

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>
This commit is contained in:
Michal Privoznik 2024-05-23 15:41:16 +02:00
parent a0c45432e0
commit 6aa94ce105

View File

@ -30,7 +30,7 @@ _@command@_complete()
c=$((++c))
done
CMDLINE=( )
CMDLINE=( "-q" )
if [ -n "${RO}" ]; then
CMDLINE+=("-r")
fi