GNU bug report logs - #32020
3 bash-completion errors

Previous Next

Package: guix;

Reported by: swedebugia <at> riseup.net

Date: Sat, 30 Jun 2018 15:32:01 UTC

Severity: normal

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32020 in the body.
You can then email your comments to 32020 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#32020; Package guix. (Sat, 30 Jun 2018 15:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to swedebugia <at> riseup.net:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 30 Jun 2018 15:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: swedebugia <at> riseup.net
To: bug-guix <at> gnu.org
Subject: 3 bash-completion errors
Date: Sat, 30 Jun 2018 08:30:48 -0700
Hi

When using -m after guix package, weather, build; bash tries to expand
on names of packages instead of files in the filesystem.

After guix build --load-path= bash does not expand. It should expand in
the local filesystem I think.

(nitpicking)
Also when expanding on "-" after guix weather; bash suggests: "--e"
among valid completions but it is NOT. Same happens after guix build.
Havent tested the others.

-- 
Cheers 
Swedebugia




Information forwarded to bug-guix <at> gnu.org:
bug#32020; Package guix. (Sat, 30 Jun 2018 16:54:01 GMT) Full text and rfc822 format available.

Message #8 received at 32020 <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: 32020 <at> debbugs.gnu.org
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>
Subject: [PATCH 1/2] bash completion: Complete files names after 'guix build
 -L'.
Date: Sat, 30 Jun 2018 19:52:58 +0300
* etc/completion/bash/guix (_guix_complete): Complete files names after 'guix
build -L'.
---
 etc/completion/bash/guix | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index 70430c5c9..cc18fbc94 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -167,6 +167,12 @@ _guix_complete ()
 		else
 		    _guix_complete_available_package "$word_at_point"
 		fi
+            elif _guix_is_command "build"
+            then
+                if _guix_is_dash_L
+                then
+                    _guix_complete_file
+                fi
 	    elif _guix_is_command "download"
 	    then
 		 _guix_complete_file
-- 
2.18.0





Information forwarded to bug-guix <at> gnu.org:
bug#32020; Package guix. (Sat, 30 Jun 2018 16:54:02 GMT) Full text and rfc822 format available.

Message #11 received at 32020 <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: 32020 <at> debbugs.gnu.org
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>
Subject: [PATCH 2/2] bash completion: Complete files names after 'guix weather
 -m'.
Date: Sat, 30 Jun 2018 19:52:59 +0300
* etc/completion/bash/guix (_guix_complete): Complete files names after 'guix
weather -m'.
---
 etc/completion/bash/guix | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index cc18fbc94..a593b8112 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -195,6 +195,12 @@ _guix_complete ()
 	    elif _guix_is_command "hash" || _guix_is_command "gc"
 	    then
 		_guix_complete_file
+            elif _guix_is_command "weather"
+            then
+                if _guix_is_dash_m
+                then
+                    _guix_complete_file
+                fi
 	    else
 		_guix_complete_available_package "$word_at_point"
 	    fi
-- 
2.18.0





Information forwarded to bug-guix <at> gnu.org:
bug#32020; Package guix. (Sat, 30 Jun 2018 17:01:02 GMT) Full text and rfc822 format available.

Message #14 received at 32020 <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: swedebugia <at> riseup.net
Cc: 32020 <at> debbugs.gnu.org
Subject: Re: bug#32020: 3 bash-completion errors
Date: Sat, 30 Jun 2018 20:00:06 +0300
[Message part 1 (text/plain, inline)]
Hello,

Thank you for the report.

swedebugia <at> riseup.net writes:

> When using -m after guix package

What version of Guix do you run?

It does for me on ‘guix --version’:
--8<---------------cut here---------------start------------->8---
guix (GNU Guix) 12a96d4d419330056d647817aa09f02f031cba6f
Copyright (C) 2018 the Guix authors
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
--8<---------------cut here---------------end--------------->8---

> weather -m

Added.

> build; bash tries to expand

‘guix build’ doesn't have ‘-m’ flag, unfortunately.  

I want to have it, too.  :-)

> on names of packages instead of files in the filesystem.
>
> After guix build --load-path= bash does not expand. It should expand in
> the local filesystem I think.

I don't know how to implement ‘--load-path=’, but ‘-L’ was added.

> (nitpicking)
> Also when expanding on "-" after guix weather; bash suggests: "--e"
> among valid completions but it is NOT. 

I cannot reproduce it, sorry.

> Same happens after guix build.  Havent tested the others.

Let us know if more completion is missing.

Thanks,
Oleg.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#32020; Package guix. (Sat, 30 Jun 2018 18:25:02 GMT) Full text and rfc822 format available.

Message #17 received at 32020 <at> debbugs.gnu.org (full text, mbox):

From: swedebugia <swedebugia <at> riseup.net>
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 32020 <at> debbugs.gnu.org
Subject: Re: bug#32020: 3 bash-completion errors
Date: Sat, 30 Jun 2018 20:24:43 +0200
[Message part 1 (text/plain, inline)]
Hi

Thanks a lot for the quick response. Wow.
Now I understand the syntax of the completion script so I will try editing it myself if I find any other commands missing completions. 😀

You can close the bug for now I think. 
-- 
Cheers Swedebugia 
[Message part 2 (text/html, inline)]

Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Sat, 30 Jun 2018 19:27:02 GMT) Full text and rfc822 format available.

Notification sent to swedebugia <at> riseup.net:
bug acknowledged by developer. (Sat, 30 Jun 2018 19:27:02 GMT) Full text and rfc822 format available.

Message #22 received at 32020-done <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: swedebugia <swedebugia <at> riseup.net>
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>, 32020-done <at> debbugs.gnu.org
Subject: Re: bug#32020: 3 bash-completion errors
Date: Sat, 30 Jun 2018 20:41:11 +0200
swedebugia <swedebugia <at> riseup.net> writes:

> You can close the bug for now I think.

You can close it yourself by sending an email to
32020-done <at> debbugs.gnu.org, just like I did with this email.

--
Ricardo





Information forwarded to bug-guix <at> gnu.org:
bug#32020; Package guix. (Mon, 02 Jul 2018 10:22:01 GMT) Full text and rfc822 format available.

Message #25 received at 32020 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 32020 <at> debbugs.gnu.org
Subject: Re: bug#32020: [PATCH 1/2] bash completion: Complete files names
 after 'guix build -L'.
Date: Mon, 02 Jul 2018 12:21:01 +0200
Oleg Pykhalov <go.wigust <at> gmail.com> skribis:

> * etc/completion/bash/guix (_guix_complete): Complete files names after 'guix
> build -L'.

[...]

> * etc/completion/bash/guix (_guix_complete): Complete files names after 'guix
> weather -m'.

OK for both, thank you Oleg!

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#32020; Package guix. (Tue, 03 Jul 2018 04:08:02 GMT) Full text and rfc822 format available.

Message #28 received at 32020-done <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 32020-done <at> debbugs.gnu.org
Subject: Re: bug#32020: [PATCH 1/2] bash completion: Complete files names
 after 'guix build -L'.
Date: Tue, 03 Jul 2018 07:06:56 +0300
[Message part 1 (text/plain, inline)]
Hello Ludovic,

Thank you for review.

ludo <at> gnu.org (Ludovic Courtès) writes:

> Oleg Pykhalov <go.wigust <at> gmail.com> skribis:
>
>> * etc/completion/bash/guix (_guix_complete): Complete files names after 'guix
>> build -L'.
>
> [...]
>
>> * etc/completion/bash/guix (_guix_complete): Complete files names after 'guix
>> weather -m'.
>
> OK for both, thank you Oleg!

Pushed as:
3a15d0aa9c55881ddc3a21570350a743c28a6c92
9b0a755f642542dd96065ad05ec9d844d8077fd7

Oleg.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 31 Jul 2018 11:24:03 GMT) Full text and rfc822 format available.

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

Previous Next


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