chiark / gitweb /
completion: fix typo in accessing array index
authorRamkumar Ramachandra <artagnon@gmail.com>
Fri, 2 Dec 2011 16:44:32 +0000 (22:14 +0530)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 28 Oct 2012 00:14:41 +0000 (02:14 +0200)
Remove spurious '}'. This error went unnoticed so far because Bash
doesn't complain.

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[*]} &&
 
         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
                         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[*]} &&
 
         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
                         verb=${COMP_WORDS[i]}
                         break
                 fi