* [bug#51373] [PATCH] etc: completion: Filter gratuitous spaces from available packages.
@ 2021-10-24 12:09 Liliana Marie Prikler
2021-10-24 13:43 ` Tobias Geerinckx-Rice via Guix-patches via
0 siblings, 1 reply; 5+ messages in thread
From: Liliana Marie Prikler @ 2021-10-24 12:09 UTC (permalink / raw)
To: 51373
* 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#51373] [PATCH] etc: completion: Filter gratuitous spaces from available packages.
2021-10-24 12:09 [bug#51373] [PATCH] etc: completion: Filter gratuitous spaces from available packages Liliana Marie Prikler
@ 2021-10-24 13:43 ` Tobias Geerinckx-Rice via Guix-patches via
2021-10-24 13:57 ` Tobias Geerinckx-Rice via Guix-patches via
0 siblings, 1 reply; 5+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2021-10-24 13:43 UTC (permalink / raw)
To: Liliana Marie Prikler; +Cc: 51373
[-- Attachment #1: Type: text/plain, Size: 274 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#51373] [PATCH] etc: completion: Filter gratuitous spaces from available packages.
2021-10-24 13:43 ` Tobias Geerinckx-Rice via Guix-patches via
@ 2021-10-24 13:57 ` Tobias Geerinckx-Rice via Guix-patches via
2021-10-24 14:47 ` Liliana Marie Prikler
0 siblings, 1 reply; 5+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2021-10-24 13:57 UTC (permalink / raw)
Cc: 51373, liliana.prikler
[-- Attachment #1: Type: text/plain, Size: 252 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#51373] [PATCH] etc: completion: Filter gratuitous spaces from available packages.
2021-10-24 13:57 ` Tobias Geerinckx-Rice via Guix-patches via
@ 2021-10-24 14:47 ` Liliana Marie Prikler
2021-10-24 19:01 ` bug#51373: " Tobias Geerinckx-Rice via Guix-patches via
0 siblings, 1 reply; 5+ messages in thread
From: Liliana Marie Prikler @ 2021-10-24 14:47 UTC (permalink / raw)
To: Tobias Geerinckx-Rice; +Cc: 51373
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-10-24 19:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-24 12:09 [bug#51373] [PATCH] etc: completion: Filter gratuitous spaces from available packages Liliana Marie Prikler
2021-10-24 13:43 ` Tobias Geerinckx-Rice via Guix-patches via
2021-10-24 13:57 ` Tobias Geerinckx-Rice via Guix-patches via
2021-10-24 14:47 ` Liliana Marie Prikler
2021-10-24 19:01 ` bug#51373: " Tobias Geerinckx-Rice via Guix-patches via
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.