bash completion: Adjust to new 'guix help' output.
This is a followup to 3794ce93be8216d8378df7b808ce7f53b1e05a53, 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 3794ce93be8216d8378df7b808ce7f53b1e05a53.
This commit is contained in:
parent
215b49a881
commit
8e0c5033b1
@ -28,7 +28,8 @@ _guix_complete_command ()
|
||||
then
|
||||
# Cache the list of commands to speed things up.
|
||||
_guix_commands="$(guix --help 2> /dev/null \
|
||||
| grep '^ ' | cut -c 2-)"
|
||||
| grep '^ ' \
|
||||
| sed '-es/^ *\([a-z-]\+\).*$/\1/g')"
|
||||
fi
|
||||
COMPREPLY=($(compgen -W "$_guix_commands" -- "$word_at_point"))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user