X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=shell-completion%2Fbash%2Fsystemctl;h=517b49a6afda79ed587518cbf80431660d1f71bd;hp=ceca3348eddc2d1c6dd23aafd5a2417459356cfa;hb=a72d698d0d9ff9c158155b44cdc77376df31a317;hpb=751e75769a0a8a255e1a47656f639768879e9518 diff --git a/shell-completion/bash/systemctl b/shell-completion/bash/systemctl index ceca3348e..517b49a6a 100644 --- a/shell-completion/bash/systemctl +++ b/shell-completion/bash/systemctl @@ -32,9 +32,10 @@ __systemd_properties() { } __contains_word () { - local word=$1; shift - for w in $*; do [[ $w = $word ]] && return 0; done - return 1 + local w word=$1; shift + for w in "$@"; do + [[ $w = "$word" ]] && return + done } __filter_units_by_property () {