bash-completion: fix completion of complete verbs
When doing 'command verb<TAB>', 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
This commit is contained in:
@@ -41,7 +41,7 @@ _hostnamectl() {
|
||||
[NAME]='set-hostname'
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user