GNU bug report logs - #30495
[PATCH] bash completion: Complete files names after 'guix package -m'.

Previous Next

Package: guix-patches;

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

Date: Sat, 17 Feb 2018 09:09:02 UTC

Severity: normal

Tags: patch

Done: Oleg Pykhalov <go.wigust <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: 30495 <at> debbugs.gnu.org
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>
Subject: [bug#30495] [PATCH] bash completion: Complete files names after 'guix package -m'.
Date: Sat, 17 Feb 2018 12:07:38 +0300
* etc/completion/bash/guix (_guix_is_dash_L): Replace with
‘_guix_is_dash_L_or_m’.
(_guix_complete): Add this.
---
 etc/completion/bash/guix | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index 6b84193db..286c4f1c5 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -97,9 +97,10 @@ _guix_is_removing ()
     $result
 }
 
-_guix_is_dash_L ()
+_guix_is_dash_L_or_m ()
 {
-    [ "${COMP_WORDS[$COMP_CWORD - 1]}" = "-L" ] \
+    comp_words_minus_1="${COMP_WORDS[$COMP_CWORD - 1]}"
+    [ "$comp_words_minus_1" = "-L" ] || [ "$comp_words_minus_1" = "-m" ] \
 	|| { case "${COMP_WORDS[$COMP_CWORD]}" in
 		 --load-path=*) true;;
 		 *)             false;;
@@ -149,7 +150,7 @@ _guix_complete ()
 	*)
 	    if _guix_is_command "package"
 	    then
-		if _guix_is_dash_L
+		if _guix_is_dash_L_or_m
 		then
 		    _guix_complete_file
 		elif _guix_is_removing
-- 
2.16.1





This bug report was last modified 7 years and 99 days ago.

Previous Next


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