summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/completion/bash/guix3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index ec6adfdb22b..5d1ae37f125 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -28,10 +28,11 @@ _guix_complete_command ()
28 if [ -z "$_guix_commands" ] 28 if [ -z "$_guix_commands" ]
29 then 29 then
30 # Cache the list of commands to speed things up. 30 # Cache the list of commands to speed things up.
31 _guix_commands="$(guix --help 2> /dev/null \ 31 _guix_commands="$(${COMP_WORDS[0]} --help 2> /dev/null \
32 | grep '^ ' \ 32 | grep '^ ' \
33 | sed '-es/^ *\([a-z-]\+\).*$/\1/g')" 33 | sed '-es/^ *\([a-z-]\+\).*$/\1/g')"
34 fi 34 fi
35
35 COMPREPLY+=($(compgen -W "$_guix_commands" -- "$word_at_point")) 36 COMPREPLY+=($(compgen -W "$_guix_commands" -- "$word_at_point"))
36} 37}
37 38