mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
bash completion: Adjust to new 'guix help' output.
This is a followup to3794ce93be
, 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 in3794ce93be
.
This commit is contained in:
parent
215b49a881
commit
8e0c5033b1
1 changed files with 3 additions and 2 deletions
|
@ -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"))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue