GNU bug report logs - #51373
[PATCH] etc: completion: Filter gratuitous spaces from available packages.

Previous Next

Package: guix-patches;

Reported by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Date: Sun, 24 Oct 2021 12:32:01 UTC

Severity: normal

Tags: patch

Done: Tobias Geerinckx-Rice <me <at> tobias.gr>

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 51373 in the body.
You can then email your comments to 51373 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 guix-patches <at> gnu.org:
bug#51373; Package guix-patches. (Sun, 24 Oct 2021 12:32:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Liliana Marie Prikler <liliana.prikler <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 24 Oct 2021 12:32:01 GMT) Full text and rfc822 format available.

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

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] etc: completion: Filter gratuitous spaces from available
 packages.
Date: Sun, 24 Oct 2021 14:09:47 +0200
* etc/completion/zsh/_guix (_guix_list_available_packages): Add a sed filter
to remove spaces.
---
 etc/completion/zsh/_guix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/etc/completion/zsh/_guix b/etc/completion/zsh/_guix
index bbc13c6ca1..6b4060ddeb 100644
--- a/etc/completion/zsh/_guix
+++ b/etc/completion/zsh/_guix
@@ -57,7 +57,7 @@ _guix_list_available_packages()
 {
     if ( [[ ${+_guix_available_packages} -eq 0 ]] || _cache_invalid GUIX_AVAILABLE_PACKAGES ) \
        && ! _retrieve_cache GUIX_AVAILABLE_PACKAGES; then
-        _guix_available_packages=(${${(f)"$(guix package -A | cut -f1)"}})
+        _guix_available_packages=(${${(f)"$(guix package -A | cut -f1 | sed -e 's/ //g')"}})
         _store_cache GUIX_AVAILABLE_PACKAGES _guix_available_packages
     fi
 }
-- 
2.33.1






Information forwarded to guix-patches <at> gnu.org:
bug#51373; Package guix-patches. (Sun, 24 Oct 2021 13:48:02 GMT) Full text and rfc822 format available.

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

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: 51373 <at> debbugs.gnu.org, guix-patches <at> gnu.org
Subject: Re: [bug#51373] [PATCH] etc: completion: Filter gratuitous spaces
 from available packages.
Date: Sun, 24 Oct 2021 15:43:44 +0200
[Message part 1 (text/plain, inline)]
Liliana Marie Prikler 写道:
> +        _guix_available_packages=(${${(f)"$(guix package -A | 
> cut -f1 | sed -e 's/ //g')"}})

Does ZSH support something like bash's "${foo[@]// /}"" to avoid 
spawning sed altogether?

Otherwise LGTM!

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#51373; Package guix-patches. (Sun, 24 Oct 2021 13:48:03 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#51373; Package guix-patches. (Sun, 24 Oct 2021 13:59:02 GMT) Full text and rfc822 format available.

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

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 51373 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler <at> gmail.com>,
 guix-patches <at> gnu.org
Subject: Re: [bug#51373] [PATCH] etc: completion: Filter gratuitous spaces
 from available packages.
Date: Sun, 24 Oct 2021 15:57:35 +0200
[Message part 1 (text/plain, inline)]
Tobias Geerinckx-Rice via Guix-patches via 写道:
> Does ZSH support something like bash's "${foo[@]// /}"" to avoid
> spawning sed altogether?

It *seems* equivalent, which is as much as I dare say of anything 
ZSH.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#51373; Package guix-patches. (Sun, 24 Oct 2021 13:59:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#51373; Package guix-patches. (Sun, 24 Oct 2021 14:48:02 GMT) Full text and rfc822 format available.

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

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 51373 <at> debbugs.gnu.org
Subject: Re: [bug#51373] [PATCH] etc: completion: Filter gratuitous spaces
 from available packages.
Date: Sun, 24 Oct 2021 16:47:26 +0200
Am Sonntag, den 24.10.2021, 15:57 +0200 schrieb Tobias Geerinckx-Rice:
> Tobias Geerinckx-Rice via Guix-patches via 写道:
> > Does ZSH support something like bash's "${foo[@]// /}"" to avoid
> > spawning sed altogether?
> 
> It *seems* equivalent, which is as much as I dare say of anything 
> ZSH.
Haha, yeah, zsh can be weird at times.  I typically don't play around
with such fancy syntax all that much so on the top of my head I
wouldn't even know how to rewrite my patch using that.  However, if it
helps not spawning a process like once during compinit, then go ahead
and use your version :)

Thanks,
Liliana





Reply sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
You have taken responsibility. (Sun, 24 Oct 2021 19:04:02 GMT) Full text and rfc822 format available.

Notification sent to Liliana Marie Prikler <liliana.prikler <at> gmail.com>:
bug acknowledged by developer. (Sun, 24 Oct 2021 19:04:02 GMT) Full text and rfc822 format available.

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

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: 51373-done <at> debbugs.gnu.org
Subject: Re: [bug#51373] [PATCH] etc: completion: Filter gratuitous spaces
 from available packages.
Date: Sun, 24 Oct 2021 21:01:04 +0200
[Message part 1 (text/plain, inline)]
Liliana Marie Prikler 写道:
> Haha, yeah, zsh can be weird at times.  I typically don't play 
> around
> with such fancy syntax all that much so on the top of my head I

Your sanity is duly envied.

> wouldn't even know how to rewrite my patch using that.  However, 
> if it
> helps not spawning a process like once during compinit, then go 
> ahead
> and use your version :)

There are plenty of other seds littering the file—though not this 
trivial.  At least commit 55f6d9e818512b4e3e4adacfa99deb201b6854be 
avoids one more.

Thanks!

T G-R
[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. (Mon, 22 Nov 2021 12:24:10 GMT) Full text and rfc822 format available.

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

Previous Next


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