[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/13: bash completion: Don't hard-code "guix" binary name.
From: |
guix-commits |
Subject: |
08/13: bash completion: Don't hard-code "guix" binary name. |
Date: |
Sat, 30 Oct 2021 18:58:34 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit 0987a0eba4e8220e98e93686a4ad3ef87433fb2f
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sat Oct 30 16:34:10 2021 +0200
bash completion: Don't hard-code "guix" binary name.
* etc/completion/bash/guix (_guix_complete_command):
Use ${COMP_WORDS[0]} instead of hard-coding "guix".
---
etc/completion/bash/guix | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index ec6adfd..5d1ae37 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"))
}
- branch master updated (c4ac8cf -> 84c6f17), guix-commits, 2021/10/30
- 01/13: gnu: bsequencer: Update to 1.8.10., guix-commits, 2021/10/30
- 02/13: gnu: bchoppr: Update to 1.10.10., guix-commits, 2021/10/30
- 03/13: gnu: bshapr: Update to 0.13., guix-commits, 2021/10/30
- 04/13: gnu: bjumblr: Update to 1.6.8., guix-commits, 2021/10/30
- 06/13: ui: Add top-level options to help text., guix-commits, 2021/10/30
- 07/13: ui: Use DISPLAY in SHOW-GUIX-HELP., guix-commits, 2021/10/30
- 08/13: bash completion: Don't hard-code "guix" binary name.,
guix-commits <=
- 12/13: gnu: remmina: Update to 1.4.21., guix-commits, 2021/10/30
- 13/13: gnu: dconf: Increase test timeout further., guix-commits, 2021/10/30
- 05/13: gnu: bschaffl: Update to 1.4.8., guix-commits, 2021/10/30
- 09/13: bash completion: Complete top-level options., guix-commits, 2021/10/30
- 10/13: gnu: polybar: Update to 3.5.7., guix-commits, 2021/10/30
- 11/13: gnu: aws-c-mqtt: Update to 0.7.8., guix-commits, 2021/10/30