zsh-users
 help / color / mirror / code / Atom feed
* Caching variables during completion
@ 2013-02-13  9:44 Jan Eike von Seggern
  2013-02-13 17:39 ` Bart Schaefer
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Eike von Seggern @ 2013-02-13  9:44 UTC (permalink / raw)
  To: zsh-users

Hello,

my question first: Is it possible to set a variable only once during 
every command-line completion, i.e. only after hitting <Tab> for the 
first time and then keeping the contents for this specific command-line?

Explanation:
I'm trying to improve the completion for xrandr (mainly screen-scraping 
the available outputs and associated modes). However, my first try 
involved screen-scraping the output of `xrandr -q` every time a 
completion was made, which was slow. I then resorted to cache the 
available output/modes in a global variable. But this fails if a new 
output gets available.

Best,
Eike


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

end of thread, other threads:[~2013-03-18 21:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-13  9:44 Caching variables during completion Jan Eike von Seggern
2013-02-13 17:39 ` Bart Schaefer
2013-02-13 20:30   ` Peter Stephenson
2013-02-14  0:39     ` Bart Schaefer
2013-02-14  8:38       ` Jan Eike von Seggern
2013-03-18 17:34         ` xrandr completion (was Re: Caching variables during completion) Jan Eike von Seggern
2013-03-18 21:14           ` Oliver Kiddle

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).