X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=shell-completion%2Fbash%2Flocalectl;h=bec9e78c64b1a531a6303f2a0ec566dfe0205107;hb=a72d698d0d9ff9c158155b44cdc77376df31a317;hp=ef19f01461ced6321fc0aa558cf9c9ca13624060;hpb=751e75769a0a8a255e1a47656f639768879e9518;p=elogind.git diff --git a/shell-completion/bash/localectl b/shell-completion/bash/localectl index ef19f0146..bec9e78c6 100644 --- a/shell-completion/bash/localectl +++ b/shell-completion/bash/localectl @@ -18,9 +18,10 @@ # along with systemd; If not, see . __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 } _localectl() {