chiark / gitweb /
completion: fix typo in accessing array index
[elogind.git] / bash-completion / systemd-bash-completion.sh
index d6adfce0eaf1decaf527489694076bf5ad17b571..38cde3b5e9bd1f4c69845bfd16c086eebc8fa68d 100644 (file)
@@ -122,7 +122,7 @@ _systemctl () {
 
         for ((i=0; $i <= $COMP_CWORD; i++)); do
                 if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]} &&
-                 ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG}]}; then
+                 ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then
                         verb=${COMP_WORDS[i]}
                         break
                 fi
@@ -245,7 +245,7 @@ _loginctl () {
 
         for ((i=0; $i <= $COMP_CWORD; i++)); do
                 if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]} &&
-                 ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG}]}; then
+                 ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then
                         verb=${COMP_WORDS[i]}
                         break
                 fi