[systemd-devel] [PATCH 2/3] completion: fix typo in accessing array index

Ramkumar Ramachandra artagnon at gmail.com
Fri Dec 2 08:44:32 PST 2011


Remove spurious '}'.  This error went unnoticed so far because Bash
doesn't complain.

Signed-off-by: Ramkumar Ramachandra <artagnon at gmail.com>
---
 src/systemd-bash-completion.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/systemd-bash-completion.sh b/src/systemd-bash-completion.sh
index 176591f..9f58b06 100644
--- a/src/systemd-bash-completion.sh
+++ b/src/systemd-bash-completion.sh
@@ -113,7 +113,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
@@ -228,7 +228,7 @@ _systemd_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
-- 
1.7.6.351.gb35ac.dirty



More information about the systemd-devel mailing list