X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=shell-completion%2Fbash%2Fhostnamectl;h=38ab1344f3f31ee67faaed3cf7293623bc3168e5;hp=a57bffe15f7647525d2ac6ba04b2bd9c39d5898e;hb=b5b7ea750388919eee6087eb63f08903b57447cf;hpb=d611dadcc74db10ba533ee6859308f5fc505aee1 diff --git a/shell-completion/bash/hostnamectl b/shell-completion/bash/hostnamectl index a57bffe15..38ab1344f 100644 --- a/shell-completion/bash/hostnamectl +++ b/shell-completion/bash/hostnamectl @@ -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 } _hostnamectl() {