chiark / gitweb /
bash-completion: fix completion of complete verbs
[elogind.git] / shell-completion / bash / busctl
index 8ce813f4b3d26d92de4874c3bb4d64f81cacb48a..7480a6c3fb863b807d802fe5bf8c104c61dfc1eb 100644 (file)
@@ -53,7 +53,7 @@ _busctl() {
                 [STANDALONE]='list monitor'
         )
 
-        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]}