chiark / gitweb /
fs-util: change chase_symlinks() behaviour in regards to escaping the root dir
[elogind.git] / shell-completion / bash / loginctl
index 7263f7f7bf71658d771dd9c4c60ecc5b132bc764..776eca4e626aeded37569c7e75f0c8d296287add 100644 (file)
@@ -33,14 +33,16 @@ _loginctl () {
         local i verb comps
 
         local -A OPTS=(
-               [STANDALONE]='--all -a --help -h --no-pager --privileged -P --version'
-                      [ARG]='--host -H --kill-who --property -p --signal -s'
-        )
+               [STANDALONE]='--all -a --help -h --no-pager --privileged -P --version
+                             --no-legend --no-ask-password -l --full'
+                      [ARG]='--host -H --kill-who --property -p --signal -s --machine'
+                      )
 
         if __contains_word "$prev" ${OPTS[ARG]}; then
                 case $prev in
                         --signal|-s)
-                                comps=$(compgen -A signal)
+                                _signals
+                                return
                         ;;
                         --kill-who)
                                 comps='all leader'
@@ -70,7 +72,7 @@ _loginctl () {
                 [ATTACH]='attach'
         )
 
-        for ((i=0; i <= COMP_CWORD; i++)); do
+        for ((i=0; i < COMP_CWORD; i++)); do
                 if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]} &&
                  ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then
                         verb=${COMP_WORDS[i]}