chiark / gitweb /
shell-completion: busctl
[elogind.git] / shell-completion / bash / systemctl
index bb2b8ad6d914429455a2a83657ddbfced1f915a7..86ea33c6e2c5fcba6bb71a121840fa53e0cec78d 100644 (file)
@@ -123,7 +123,7 @@ _systemctl () {
         fi
 
         local -A VERBS=(
-                [ALL_UNITS]='is-active is-failed is-enabled status show mask preset help list-dependencies'
+                [ALL_UNITS]='is-active is-failed is-enabled status show cat mask preset help list-dependencies'
             [ENABLED_UNITS]='disable'
            [DISABLED_UNITS]='enable'
         [REENABLABLE_UNITS]='reenable'
@@ -146,7 +146,7 @@ _systemctl () {
                   [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]}
@@ -154,7 +154,7 @@ _systemctl () {
                 fi
         done
 
-        if   [[ -z $verb ]]; then
+        if [[ -z $verb ]]; then
                 comps="${VERBS[*]}"
 
         elif __contains_word "$verb" ${VERBS[ALL_UNITS]}; then