chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bus: add sd_bus_get_current() bus call to determine message that is currently being...
[elogind.git]
/
shell-completion
/
bash
/
loginctl
diff --git
a/shell-completion/bash/loginctl
b/shell-completion/bash/loginctl
index 1844085d49ee76a49a1e28570a2e424040f349e7..3104b305fa49b55c5e344b67272730ed4c96e4b1 100644
(file)
--- 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 () {
# 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; } ; }
}
__get_all_sessions () { loginctl list-sessions | { while read -r a b; do printf "%s\n" "$a"; done; } ; }