emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#30495: closed ([PATCH] bash completion: Complete f


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#30495: closed ([PATCH] bash completion: Complete files names after 'guix package -m'.)
Date: Sat, 17 Feb 2018 19:26:02 +0000

Your message dated Sat, 17 Feb 2018 22:25:11 +0300
with message-id <address@hidden>
and subject line Re: [bug#30495] [PATCH] bash completion: Complete files names 
after 'guix package -m'.
has caused the debbugs.gnu.org bug report #30495,
regarding [PATCH] bash completion: Complete files names after 'guix package -m'.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
30495: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=30495
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [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




--- End Message ---
--- Begin Message --- Subject: Re: [bug#30495] [PATCH] bash completion: Complete files names after 'guix package -m'. Date: Sat, 17 Feb 2018 22:25:11 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
Marius Bakke <address@hidden> writes:

> Oleg Pykhalov <address@hidden> writes:
>
>> Marius Bakke <address@hidden> writes:
>>
>>> Oleg Pykhalov <address@hidden> writes:
>>>
>>>> * etc/completion/bash/guix (_guix_is_dash_L): Replace with
>>>> ‘_guix_is_dash_L_or_m’.
>>>> (_guix_complete): Add this.
>>>
>>> [...]
>>>
>>>> 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;;
>>>
>>> I think this fails to account for the long form "--manifest".  Perhaps
>>> it's better to add a new "_guix_is_dash_m" and use
>>>
>>> "if _guix_is_dash_L || _guix_is_dash_m"
>>>
>>> below.  WDYT?
>>
>> Nice catch!  Thanks.
>>
>> But I don't know how to implement a file completion for ‘--manifest=’.
>> ‘--load-path=’ doesn't have a file completion too.  Only completion for
>> equal sign before.
>
> Oh, OK.  That's another issue I guess.  The patch below LGTM, but the
> commit message needs adjusting ;-)

Ouch, thank you for reminding.

Pushed as f5f916792c7069a22d95c5b7c68bcf3bbb86e451

I'll close the bug report.

Thanks,
Oleg.

Attachment: signature.asc
Description: PGP signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]