From 8e0c5033b17fcf1e4596ee9a3d52157900acc6fa Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 24 Sep 2020 16:26:34 +0200 Subject: bash completion: Adjust to new 'guix help' output. This is a followup to 3794ce93be8216d8378df7b808ce7f53b1e05a53, which broke command completion. Reported by Oleg Pykhalov . * etc/completion/bash/guix (_guix_complete_command): Update to match output of 'guix help' as introduced in 3794ce93be8216d8378df7b808ce7f53b1e05a53. --- etc/completion/bash/guix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix index aa217bd318..fdbdf46810 100644 --- a/etc/completion/bash/guix +++ b/etc/completion/bash/guix @@ -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")) } -- cgit v1.2.3