chiark / gitweb /
shell-completion: dump has moved to systemd-analyze
[elogind.git] / shell-completion / bash / loginctl
index 1844085d49ee76a49a1e28570a2e424040f349e7..3104b305fa49b55c5e344b67272730ed4c96e4b1 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
 }
 
 __get_all_sessions () { loginctl list-sessions | { while read -r a b; do printf "%s\n" "$a"; done; } ; }