X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=shell-completion%2Fbash%2Fjournalctl;h=3c40d57a98f9d7d0cd9298e3e07426abbac6a3c0;hp=29bf6bca3fe95f6739788e7ea7aa2cbdd807693c;hb=fe05567c31cb88593a09ce5d8961d8b20627feb1;hpb=a331b5e6d4724365bad9edeb9420c7e26e7f50da diff --git a/shell-completion/bash/journalctl b/shell-completion/bash/journalctl index 29bf6bca3..3c40d57a9 100644 --- a/shell-completion/bash/journalctl +++ b/shell-completion/bash/journalctl @@ -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 } __journal_fields=(MESSAGE{,_ID} PRIORITY CODE_{FILE,LINE,FUNC}