GNU bug report logs - #63860
[PATCH] Shepherd: Add Bash completion file.

Previous Next

Package: guix-patches;

Reported by: Oleg Pykhalov <go.wigust <at> gmail.com>

Date: Fri, 2 Jun 2023 22:20:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Subject: bug#63860: closed (Re: bug#63860: [PATCH] Shepherd: Add Bash
 completion file.)
Date: Mon, 05 Jun 2023 12:04:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#63860: [PATCH] Shepherd: Add Bash completion file.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 63860 <at> debbugs.gnu.org.

-- 
63860: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63860
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 63860-done <at> debbugs.gnu.org,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Subject: Re: bug#63860: [PATCH] Shepherd: Add Bash completion file.
Date: Mon, 05 Jun 2023 14:03:32 +0200
[Message part 3 (text/plain, inline)]
Hello,

Oleg Pykhalov <go.wigust <at> 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’.

[Message part 4 (text/x-patch, inline)]
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 <at> 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]}")
             ;;
         *)
             ;;
[Message part 5 (message/rfc822, inline)]
From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>
Subject: [PATCH] Shepherd: Add Bash completion file.
Date: Sat,  3 Jun 2023 01:19:23 +0300
This patch adds a Bash completion file discussed in the 45004 issue:

awk replaced with grep and sed;
added more Guix related subcommands;
fixed typo with 't' letter in 'for word in ${COMP_WORDS[*]}t'.

Tested with command:

    guix build -f guix.scm

which produced:

    /gnu/store/hr4rqm9wi9i2fpcd75zpqfd04vqavyif-shepherd-0.10.99-git/etc/bash_completion.d/herd

Oleg Pykhalov (1):
  Add Bash completion file.

 Makefile.am              |   4 ++
 configure.ac             |   9 ++++
 etc/completion/bash/herd | 104 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 117 insertions(+)
 create mode 100644 etc/completion/bash/herd


base-commit: b9b15db9e5bda27287706b6727c462df686e7621
-- 
2.38.0




This bug report was last modified 2 years and 42 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.