~ruther/guix-local

f2c66fbe1f01b720741e0fe2bfa619ca2862a6b8 — Ludovic Courtès 9 years ago a93c1c5
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.
1 files changed, 1 insertions(+), 1 deletions(-)

M etc/completion/bash/guix
M etc/completion/bash/guix => etc/completion/bash/guix +1 -1
@@ 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 ()