chiark / gitweb /
shell-completions: systemd-analyze set-log-level
[elogind.git] / shell-completion / bash / journalctl
index 29bf6bca3fe95f6739788e7ea7aa2cbdd807693c..3c40d57a98f9d7d0cd9298e3e07426abbac6a3c0 100644 (file)
 # along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
 __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}