unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#32020: 3 bash-completion errors
@ 2018-06-30 15:30 swedebugia
  2018-06-30 16:52 ` bug#32020: [PATCH 1/2] bash completion: Complete files names after 'guix build -L' Oleg Pykhalov
  2018-06-30 17:00 ` bug#32020: 3 bash-completion errors Oleg Pykhalov
  0 siblings, 2 replies; 8+ messages in thread
From: swedebugia @ 2018-06-30 15:30 UTC (permalink / raw)
  To: 32020

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#32020: [PATCH 1/2] bash completion: Complete files names after 'guix build -L'.
  2018-06-30 15:30 bug#32020: 3 bash-completion errors swedebugia
@ 2018-06-30 16:52 ` Oleg Pykhalov
  2018-06-30 16:52   ` bug#32020: [PATCH 2/2] bash completion: Complete files names after 'guix weather -m' Oleg Pykhalov
  2018-07-02 10:21   ` bug#32020: [PATCH 1/2] bash completion: Complete files names after 'guix build -L' Ludovic Courtès
  2018-06-30 17:00 ` bug#32020: 3 bash-completion errors Oleg Pykhalov
  1 sibling, 2 replies; 8+ messages in thread
From: Oleg Pykhalov @ 2018-06-30 16:52 UTC (permalink / raw)
  To: 32020

* 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* bug#32020: [PATCH 2/2] bash completion: Complete files names after 'guix weather -m'.
  2018-06-30 16:52 ` bug#32020: [PATCH 1/2] bash completion: Complete files names after 'guix build -L' Oleg Pykhalov
@ 2018-06-30 16:52   ` Oleg Pykhalov
  2018-07-02 10:21   ` bug#32020: [PATCH 1/2] bash completion: Complete files names after 'guix build -L' Ludovic Courtès
  1 sibling, 0 replies; 8+ messages in thread
From: Oleg Pykhalov @ 2018-06-30 16:52 UTC (permalink / raw)
  To: 32020

* 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* bug#32020: 3 bash-completion errors
  2018-06-30 15:30 bug#32020: 3 bash-completion errors swedebugia
  2018-06-30 16:52 ` bug#32020: [PATCH 1/2] bash completion: Complete files names after 'guix build -L' Oleg Pykhalov
@ 2018-06-30 17:00 ` Oleg Pykhalov
  2018-06-30 18:24   ` swedebugia
  1 sibling, 1 reply; 8+ messages in thread
From: Oleg Pykhalov @ 2018-06-30 17:00 UTC (permalink / raw)
  To: swedebugia; +Cc: 32020

[-- Attachment #1: Type: text/plain, Size: 1316 bytes --]

Hello,

Thank you for the report.

swedebugia@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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#32020: 3 bash-completion errors
  2018-06-30 17:00 ` bug#32020: 3 bash-completion errors Oleg Pykhalov
@ 2018-06-30 18:24   ` swedebugia
  2018-06-30 18:41     ` Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: swedebugia @ 2018-06-30 18:24 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 32020

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

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 

[-- Attachment #2: Type: text/html, Size: 284 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#32020: 3 bash-completion errors
  2018-06-30 18:24   ` swedebugia
@ 2018-06-30 18:41     ` Ricardo Wurmus
  0 siblings, 0 replies; 8+ messages in thread
From: Ricardo Wurmus @ 2018-06-30 18:41 UTC (permalink / raw)
  To: swedebugia; +Cc: 32020-done


swedebugia <swedebugia@riseup.net> writes:

> You can close the bug for now I think.

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

--
Ricardo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#32020: [PATCH 1/2] bash completion: Complete files names after 'guix build -L'.
  2018-06-30 16:52 ` bug#32020: [PATCH 1/2] bash completion: Complete files names after 'guix build -L' Oleg Pykhalov
  2018-06-30 16:52   ` bug#32020: [PATCH 2/2] bash completion: Complete files names after 'guix weather -m' Oleg Pykhalov
@ 2018-07-02 10:21   ` Ludovic Courtès
  2018-07-03  4:06     ` Oleg Pykhalov
  1 sibling, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2018-07-02 10:21 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 32020

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#32020: [PATCH 1/2] bash completion: Complete files names after 'guix build -L'.
  2018-07-02 10:21   ` bug#32020: [PATCH 1/2] bash completion: Complete files names after 'guix build -L' Ludovic Courtès
@ 2018-07-03  4:06     ` Oleg Pykhalov
  0 siblings, 0 replies; 8+ messages in thread
From: Oleg Pykhalov @ 2018-07-03  4:06 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 32020-done

[-- Attachment #1: Type: text/plain, Size: 490 bytes --]

Hello Ludovic,

Thank you for review.

ludo@gnu.org (Ludovic Courtès) writes:

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-07-03  4:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-30 15:30 bug#32020: 3 bash-completion errors swedebugia
2018-06-30 16:52 ` bug#32020: [PATCH 1/2] bash completion: Complete files names after 'guix build -L' Oleg Pykhalov
2018-06-30 16:52   ` bug#32020: [PATCH 2/2] bash completion: Complete files names after 'guix weather -m' Oleg Pykhalov
2018-07-02 10:21   ` bug#32020: [PATCH 1/2] bash completion: Complete files names after 'guix build -L' Ludovic Courtès
2018-07-03  4:06     ` Oleg Pykhalov
2018-06-30 17:00 ` bug#32020: 3 bash-completion errors Oleg Pykhalov
2018-06-30 18:24   ` swedebugia
2018-06-30 18:41     ` Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).