[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#63860: [PATCH] Shepherd: Add Bash completion file.
From: |
Ludovic Courtès |
Subject: |
bug#63860: [PATCH] Shepherd: Add Bash completion file. |
Date: |
Mon, 05 Jun 2023 14:03:32 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hello,
Oleg Pykhalov <go.wigust@gmail.com> skribis:
> * etc/completion/bash/herd: New file.
> * Makefile.am (dist_bashcompletion_DATA): New variable.
> * configure.ac: Add --with-bash-completion-dir.
Excellent! Applied with the changes below.
Thank you & thanks Liliana for reviewing!
Ludo’.
diff --git a/NEWS b/NEWS
index d6c2fc0..b644adb 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,11 @@ Please send Shepherd bug reports to bug-guix@gnu.org.
* Changes in 0.10.2
+** New Bash completion
+
+A Bash completion file is now installed, providing tab completion for the
+‘herd’ command.
+
** ‘herd’ shows a hint when the service and action are likely swapped
The hint is printed for instance when typing ‘herd foobar start’.
diff --git a/etc/completion/bash/herd b/etc/completion/bash/herd
index f006b86..74e7a24 100644
--- a/etc/completion/bash/herd
+++ b/etc/completion/bash/herd
@@ -44,8 +44,8 @@ _herd_complete_3()
local command="${COMP_WORDS[2]}"
case "$command" in
guix-daemon)
- complitions="on off"
- mapfile -t COMPREPLY < <(compgen -W "$complitions" --
"${COMP_WORDS[$COMP_CWORD]}")
+ completions="on off"
+ mapfile -t COMPREPLY < <(compgen -W "$completions" --
"${COMP_WORDS[$COMP_CWORD]}")
;;
*)
;;