chiark / gitweb /
shell-completion: remove load from systemctl
[elogind.git] / shell-completion / bash / systemctl
index e96b1f2ccc7dc2e613f2fde940fe6b5214bc63ba..232d2d65f4ca3d9976b462ebd0f40214058215fa 100644 (file)
@@ -141,12 +141,12 @@ _systemctl () {
                              emergency exit halt hibernate hybrid-sleep kexec list-jobs
                              list-sockets list-timers list-units list-unit-files poweroff
                              reboot rescue show-environment suspend get-default'
                              emergency exit halt hibernate hybrid-sleep kexec list-jobs
                              list-sockets list-timers list-units list-unit-files poweroff
                              reboot rescue show-environment suspend get-default'
-                     [NAME]='snapshot load'
+                     [NAME]='snapshot'
                      [FILE]='link'
                   [TARGETS]='set-default'
         )
 
                      [FILE]='link'
                   [TARGETS]='set-default'
         )
 
-        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]}
                 if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]} &&
                  ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then
                         verb=${COMP_WORDS[i]}
@@ -154,7 +154,7 @@ _systemctl () {
                 fi
         done
 
                 fi
         done
 
-        if   [[ -z $verb ]]; then
+        if [[ -z $verb ]]; then
                 comps="${VERBS[*]}"
 
         elif __contains_word "$verb" ${VERBS[ALL_UNITS]}; then
                 comps="${VERBS[*]}"
 
         elif __contains_word "$verb" ${VERBS[ALL_UNITS]}; then