chiark / gitweb /
bash-completion: fix completion of complete verbs
[elogind.git] / shell-completion / bash / systemd-analyze
index 98c793be9935d90bcc468e2567fb3939f643614f..6afcd963c33f3cc9598410df8b8c1445a4e646f1 100644 (file)
@@ -39,7 +39,7 @@ _systemd_analyze() {
 
         _init_completion || return
 
-        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]}