diff --git a/shell-completion/bash/busctl b/shell-completion/bash/busctl index c357c25bc32..1ac8ac7ecae 100644 --- a/shell-completion/bash/busctl +++ b/shell-completion/bash/busctl @@ -28,20 +28,23 @@ __contains_word () { __get_machines() { local a b - machinectl list --no-legend --no-pager | { while read a b; do echo " $a"; done; }; + machinectl list --no-legend --no-pager 2>/dev/null | + { while read a b; do echo " $a"; done; }; } __get_busnames() { local mode=$1 local a b - busctl $mode list --no-legend --no-pager | { while read a b; do echo " $a"; done; }; + busctl $mode list --no-legend --no-pager 2>/dev/null | + { while read a b; do echo " $a"; done; }; } __get_objects() { local mode=$1 local busname=$2 local a b - busctl $mode tree --list --no-legend --no-pager $busname | { while read a b; do echo " $a"; done; }; + busctl $mode tree --list --no-legend --no-pager $busname 2>/dev/null | + { while read a b; do echo " $a"; done; }; } __get_interfaces() { @@ -49,7 +52,8 @@ __get_interfaces() { local busname=$2 local path=$3 local a b c - busctl $mode introspect --list --no-legend --no-pager $busname $path | { while read a b c; do [[ "$b" == "interface" ]] && echo " $a"; done; }; + busctl $mode introspect --list --no-legend --no-pager $busname $path 2>/dev/null | + { while read a b c; do [[ "$b" == "interface" ]] && echo " $a"; done; }; } __get_members() { @@ -60,7 +64,9 @@ __get_members() { local type=$5 local flags=$6 local a b c d e - busctl $mode introspect --list --no-legend --no-pager $busname $path $interface | sed -e 's/^\.//' | { while read a b c d e; do [[ "$b" == "$type" && ( -z $flags || "$e" == "$flags" ) ]] && echo " $a"; done; }; + busctl $mode introspect --list --no-legend --no-pager $busname $path $interface 2>/dev/null | + sed -e 's/^\.//' | + { while read a b c d e; do [[ "$b" == "$type" && ( -z $flags || "$e" == "$flags" ) ]] && echo " $a"; done; }; } __get_signature() { @@ -70,7 +76,8 @@ __get_signature() { local interface=$4 local member=$5 local a b c d - busctl $mode introspect --list --no-legend --no-pager $busname $path $interface | sed -e 's/^\.//' | { while read a b c d; do [[ "$a" == "$member" && "$c" != '-' ]] && echo " \"$c\""; done; }; + busctl $mode introspect --list --no-legend --no-pager $busname $path $interface 2>/dev/null | + sed -e 's/^\.//' | { while read a b c d; do [[ "$a" == "$member" && "$c" != '-' ]] && echo " \"$c\""; done; }; } _busctl() {