bash completion: Adjust to new 'guix help' output.
This is a followup tomaster3794ce93be
, 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
.
parent
215b49a881
commit
8e0c5033b1
|
@ -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"))
|
||||
}
|
||||
|
|
Reference in New Issue