From 3ce09b7da2eb8b888066468663b2b5c81a05a03c Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Thu, 6 Feb 2014 00:31:22 -0500 Subject: bash-completion: fix completion of complete verbs When doing 'command verb', the arguments for verb would be proposed, but it is too early. We should complete verb first. https://bugs.freedesktop.org/show_bug.cgi?id=74596 --- shell-completion/bash/timedatectl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell-completion/bash/timedatectl') diff --git a/shell-completion/bash/timedatectl b/shell-completion/bash/timedatectl index c6a6545257..1a0acc6c7c 100644 --- a/shell-completion/bash/timedatectl +++ b/shell-completion/bash/timedatectl @@ -52,7 +52,7 @@ _timedatectl() { [TIME]='set-time' ) - for ((i=0; i <= COMP_CWORD; i++)); do + for ((i=0; i < COMP_CWORD; i++)); do if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]}; then verb=${COMP_WORDS[i]} break -- cgit v1.2.3-54-g00ecf