chiark / gitweb /
shell-completion: systemctl cat
[elogind.git] / shell-completion / bash / systemd-coredumpctl
index 4bbece7347a09d9e5294aee5af29260c01f2d9e2..805e84824e384882e1307bb81aa0543193558093 100644 (file)
 # along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
 __contains_word () {
 # 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}
 }
 
 __journal_fields=(MESSAGE{,_ID} PRIORITY CODE_{FILE,LINE,FUNC}