chiark / gitweb /
Updates in bash autocompletions
[elogind.git] / shell-completion / bash / loginctl
index 7263f7f7bf71658d771dd9c4c60ecc5b132bc764..7a083d28756cde70594649ea676402b589bebdec 100644 (file)
@@ -33,9 +33,10 @@ _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
@@ -70,7 +71,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]}