diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-02-06 17:08:35 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-02-07 00:08:10 +0100 |
commit | f2c66fbe1f01b720741e0fe2bfa619ca2862a6b8 (patch) | |
tree | 53420eeacee998f0348de9aad14777fa296ee2fa /etc | |
parent | a93c1c59218aac49382c35fe23d1e0f021e6e676 (diff) | |
download | guix-f2c66fbe1f01b720741e0fe2bfa619ca2862a6b8.tar.gz |
bash completion: Complete subcommands for the current word.
* etc/completion/bash/guix (_guix_complete_subcommand): Refer to the $COMP_CWORD element instead of the last element.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/completion/bash/guix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix index 00c3dfaf49..6a5f281c4f 100644 --- a/etc/completion/bash/guix +++ b/etc/completion/bash/guix @@ -26,7 +26,7 @@ _guix_complete_subcommand () local subcommands="$(${COMP_WORDS[0]} $command --help 2> /dev/null \ | grep '^ [a-z]' \ | sed -e's/^ \+\([a-z-]\+\).*$/\1/g')" - COMPREPLY=($(compgen -W "$subcommands" -- "${COMP_WORDS[${#COMP_WORDS[*]} - 1]}")) + COMPREPLY=($(compgen -W "$subcommands" -- "${COMP_WORDS[$COMP_CWORD]}")) } _guix_complete_available_package () |