summaryrefslogtreecommitdiff
path: root/etc/completion/bash/guix
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-10-19 12:51:57 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-10-19 13:11:40 -0400
commit5e2140511c1ad9ccd731438b74d61b62111da1e6 (patch)
treea4ff748ad26e121b88469b5d921001ef1382be8f /etc/completion/bash/guix
parent9e3a5ee417ea7fe9721be8804ff047e80c4f22ed (diff)
parent353bdae32f72b720c7ddd706576ccc40e2b43f95 (diff)
downloadguix-patches-5e2140511c1ad9ccd731438b74d61b62111da1e6.tar
guix-patches-5e2140511c1ad9ccd731438b74d61b62111da1e6.tar.gz
Merge branch 'staging'
Conflicts: gnu/packages/admin.scm gnu/packages/commencement.scm gnu/packages/gdb.scm gnu/packages/llvm.scm gnu/packages/package-management.scm gnu/packages/tls.scm
Diffstat (limited to 'etc/completion/bash/guix')
-rw-r--r--etc/completion/bash/guix7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index 98d20484f7..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"))
}
@@ -181,7 +182,7 @@ _guix_complete ()
*)
if _guix_is_command "package"
then
- if _guix_is_dash_L || _guix_is_dash_m
+ if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_p
then
_guix_complete_file
elif _guix_is_removing