aboutsummaryrefslogtreecommitdiff
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 ec6adfdb22..5d1ae37f12 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -28,10 +28,11 @@ _guix_complete_command ()
if [ -z "$_guix_commands" ]
then
# Cache the list of commands to speed things up.
- _guix_commands="$(guix --help 2> /dev/null \
+ _guix_commands="$(${COMP_WORDS[0]} --help 2> /dev/null \
| grep '^ ' \
| sed '-es/^ *\([a-z-]\+\).*$/\1/g')"
fi
+
COMPREPLY+=($(compgen -W "$_guix_commands" -- "$word_at_point"))
}