chiark / gitweb /
test: fix some tests when running inside a container
[elogind.git] / shell-completion / bash / loginctl
index 7263f7f7bf71658d771dd9c4c60ecc5b132bc764..e7adb93f97b03599692f6ebc9fea2caa73b4a2fb 100644 (file)
@@ -70,7 +70,7 @@ _loginctl () {
                 [ATTACH]='attach'
         )
 
-        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]}