summaryrefslogtreecommitdiff
path: root/shell-completion/bash/loginctl
diff options
context:
space:
mode:
Diffstat (limited to 'shell-completion/bash/loginctl')
-rw-r--r--shell-completion/bash/loginctl7
1 files changed, 4 insertions, 3 deletions
diff --git a/shell-completion/bash/loginctl b/shell-completion/bash/loginctl
index 1844085d49..3104b305fa 100644
--- a/shell-completion/bash/loginctl
+++ b/shell-completion/bash/loginctl
@@ -18,9 +18,10 @@
# 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; } ; }