all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#36868: guix system build autocompletes with package list
@ 2019-07-31  2:44 Jesse Gibbons
  2021-06-15 20:58 ` bug#36868: [PATCH] etc: completion: remove package list when using completion on guix system build Solene Rapenne via Bug reports for GNU Guix
  0 siblings, 1 reply; 5+ messages in thread
From: Jesse Gibbons @ 2019-07-31  2:44 UTC (permalink / raw)
  To: 36868

In bash, when I type "guix system build" and press tab to autocomplete,
I get a list of packages. I would expect it to list scheme source files
like the "guix system {container,disk-image,docker-image,extension-graph,init,reconfigure,shepherd-graph,vm,vm-image}" autocompletes. 

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

* bug#36868: [PATCH] etc: completion: remove package list when using completion on guix system build
  2019-07-31  2:44 bug#36868: guix system build autocompletes with package list Jesse Gibbons
@ 2021-06-15 20:58 ` Solene Rapenne via Bug reports for GNU Guix
  2021-06-18  9:59   ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Solene Rapenne via Bug reports for GNU Guix @ 2021-06-15 20:58 UTC (permalink / raw)
  To: 36868

---
 etc/completion/bash/guix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index 26480e5863..ef98e9feca 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -235,7 +235,7 @@ _guix_complete ()
 		fi
             elif _guix_is_command "build"
             then
-                if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_f
+                if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_f || _guix_is_command "system"
                 then
                     _guix_complete_file
 		else
-- 
2.32.0

I am absolutely unsure about the commit message for such changes.




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

* bug#36868: [PATCH] etc: completion: remove package list when using completion on guix system build
  2021-06-15 20:58 ` bug#36868: [PATCH] etc: completion: remove package list when using completion on guix system build Solene Rapenne via Bug reports for GNU Guix
@ 2021-06-18  9:59   ` Ludovic Courtès
  2021-06-18 10:33     ` Solene Rapenne via Bug reports for GNU Guix
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2021-06-18  9:59 UTC (permalink / raw)
  To: 36868; +Cc: solene

Hi,

Solene Rapenne via Bug reports for GNU Guix <bug-guix@gnu.org> skribis:

> ---
>  etc/completion/bash/guix | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
> index 26480e5863..ef98e9feca 100644
> --- a/etc/completion/bash/guix
> +++ b/etc/completion/bash/guix
> @@ -235,7 +235,7 @@ _guix_complete ()
>  		fi
>              elif _guix_is_command "build"
>              then
> -                if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_f
> +                if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_f || _guix_is_command "system"

It seems to me that if _guix_is_command "build" is true, then
_guix_is_command "system" cannot also be true.  WDYT?

Thanks for addressing this longstanding issue!

Ludo’.




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

* bug#36868: [PATCH] etc: completion: remove package list when using completion on guix system build
  2021-06-18  9:59   ` Ludovic Courtès
@ 2021-06-18 10:33     ` Solene Rapenne via Bug reports for GNU Guix
  2021-06-20 21:10       ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Solene Rapenne via Bug reports for GNU Guix @ 2021-06-18 10:33 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 36868

Le Fri, 18 Jun 2021 11:59:53 +0200,
Ludovic Courtès <ludo@gnu.org> a écrit :

> Hi,
> 
> Solene Rapenne via Bug reports for GNU Guix <bug-guix@gnu.org> skribis:
> 
> > ---
> >  etc/completion/bash/guix | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
> > index 26480e5863..ef98e9feca 100644
> > --- a/etc/completion/bash/guix
> > +++ b/etc/completion/bash/guix
> > @@ -235,7 +235,7 @@ _guix_complete ()
> >  		fi
> >              elif _guix_is_command "build"
> >              then
> > -                if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_f
> > +                if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_f || _guix_is_command "system"  
> 
> It seems to me that if _guix_is_command "build" is true, then
> _guix_is_command "system" cannot also be true.  WDYT?
> 
> Thanks for addressing this longstanding issue!
> 
> Ludo’.

the file has been reworked in commits

- dc3ba8c83602d69294e21d1b0c066f0d89890b56
- 80a17aae7991c6df061a98bb71734485f4ca17e2

now the code is entirely different and works as expected.

IIRC when I worked on this piece of code, _guix_is_command "foobar" was
looking for foobar in all words of the command. So you could have
_guix_is_command returning true for "build" and "system" at the same
time when using "guix system build".




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

* bug#36868: [PATCH] etc: completion: remove package list when using completion on guix system build
  2021-06-18 10:33     ` Solene Rapenne via Bug reports for GNU Guix
@ 2021-06-20 21:10       ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2021-06-20 21:10 UTC (permalink / raw)
  To: Solene Rapenne; +Cc: 36868-done

Hi,

Solene Rapenne <solene@perso.pw> skribis:

> the file has been reworked in commits
>
> - dc3ba8c83602d69294e21d1b0c066f0d89890b56
> - 80a17aae7991c6df061a98bb71734485f4ca17e2
>
> now the code is entirely different and works as expected.

Heh, looks like Tobias & you felt the need to address this annoyance at
the same time.  :-)

> IIRC when I worked on this piece of code, _guix_is_command "foobar" was
> looking for foobar in all words of the command. So you could have
> _guix_is_command returning true for "build" and "system" at the same
> time when using "guix system build".

Ah OK.

Anyway, glad that it’s fixed now; thank you!

Ludo’.




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

end of thread, other threads:[~2021-06-20 21:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-31  2:44 bug#36868: guix system build autocompletes with package list Jesse Gibbons
2021-06-15 20:58 ` bug#36868: [PATCH] etc: completion: remove package list when using completion on guix system build Solene Rapenne via Bug reports for GNU Guix
2021-06-18  9:59   ` Ludovic Courtès
2021-06-18 10:33     ` Solene Rapenne via Bug reports for GNU Guix
2021-06-20 21:10       ` Ludovic Courtès

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.