GNU bug report logs - #36868
guix system build autocompletes with package list

Previous Next

Package: guix;

Reported by: Jesse Gibbons <jgibbons2357 <at> gmail.com>

Date: Wed, 31 Jul 2019 02:45:01 UTC

Severity: normal

Tags: easy

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Solene Rapenne <solene <at> perso.pw>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 36868 <at> debbugs.gnu.org
Subject: Re: bug#36868: [PATCH] etc: completion: remove package list when
 using completion on guix system build
Date: Fri, 18 Jun 2021 12:33:53 +0200
Le Fri, 18 Jun 2021 11:59:53 +0200,
Ludovic Courtès <ludo <at> gnu.org> a écrit :

> Hi,
> 
> Solene Rapenne via Bug reports for GNU Guix <bug-guix <at> 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".




This bug report was last modified 3 years and 339 days ago.

Previous Next


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