* Completion for limits
@ 1999-06-15 8:41 Kiddle, Oliver
1999-06-15 16:36 ` Bart Schaefer
0 siblings, 1 reply; 3+ messages in thread
From: Kiddle, Oliver @ 1999-06-15 8:41 UTC (permalink / raw)
To: 'zsh-workers@sunsite.auc.dk'
The new-style completion for limits doesn't work anymore. Patch follows:
Oliver Kiddle
*** Completion/Builtins/_limits.old Mon Jun 14 22:45:07 1999
--- Completion/Builtins/_limits Mon Jun 14 22:47:41 1999
***************
*** 1,3 ****
#compdef limit unlimit
! compgen -k "(${(j: :)${(f)$(limit)}%% *})"
--- 1,3 ----
#compdef limit unlimit
! compgen -s '${${(f)"$(limit)"}%% *}'
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Completion for limits
1999-06-15 8:41 Completion for limits Kiddle, Oliver
@ 1999-06-15 16:36 ` Bart Schaefer
1999-06-16 7:52 ` Peter Stephenson
0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 1999-06-15 16:36 UTC (permalink / raw)
To: 'zsh-workers@sunsite.auc.dk'
On Jun 15, 9:41am, Kiddle, Oliver wrote:
} Subject: Completion for limits
}
} The new-style completion for limits doesn't work anymore.
}
} ! compgen -k "(${(j: :)${(f)$(limit)}%% *})"
} --- 1,3 ----
} ! compgen -s '${${(f)"$(limit)"}%% *}'
Hrm. This must have been broken for a while ... even before the change
to handling of quotes within ${...}, that would have needed to be
compgen -k "(${(@j: :)${(f)$(limit)}%% *})"
Using `compgen -s ...' is going to re-evaluate $(limit) every time the
completion is performed. Is adding the @ a better choice?
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Completion for limits
1999-06-15 16:36 ` Bart Schaefer
@ 1999-06-16 7:52 ` Peter Stephenson
0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 1999-06-16 7:52 UTC (permalink / raw)
To: 'zsh-workers@sunsite.auc.dk'
"Bart Schaefer" wrote:
> Hrm. This must have been broken for a while ... even before the change
> to handling of quotes within ${...}, that would have needed to be
>
> compgen -k "(${(@j: :)${(f)$(limit)}%% *})"
>
> Using `compgen -s ...' is going to re-evaluate $(limit) every time the
> completion is performed. Is adding the @ a better choice?
It doesn't help you with new completion. The same function is going to be
called every time, so the $(limit) will always be expanded anew, but before
compgen is called rather than in the bowels. The only way round that is to
cache the value in a variable the first time and use that, which doesn't
seem worth the effort and the space.
--
Peter Stephenson <pws@ibmth.df.unipi.it> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-06-16 8:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-15 8:41 Completion for limits Kiddle, Oliver
1999-06-15 16:36 ` Bart Schaefer
1999-06-16 7:52 ` Peter Stephenson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
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 NNTP newsgroup(s).