me
/
guix
Archived
1
0
Fork 0

bash completion: Adjust to new 'guix help' output.

This is a followup to 3794ce93be, which
broke command completion.

Reported by Oleg Pykhalov <go.wigust@gmail.com>.

* etc/completion/bash/guix (_guix_complete_command): Update to match
output of 'guix help' as introduced in
3794ce93be.
master
Ludovic Courtès 2020-09-24 16:26:34 +02:00
parent 215b49a881
commit 8e0c5033b1
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 3 additions and 2 deletions

View File

@ -27,8 +27,9 @@ _guix_complete_command ()
if [ -z "$_guix_commands" ]
then
# Cache the list of commands to speed things up.
_guix_commands="$(guix --help 2> /dev/null \
| grep '^ ' | cut -c 2-)"
_guix_commands="$(guix --help 2> /dev/null \
| grep '^ ' \
| sed '-es/^ *\([a-z-]\+\).*$/\1/g')"
fi
COMPREPLY=($(compgen -W "$_guix_commands" -- "$word_at_point"))
}