Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Caching variables during completion
- X-seq: zsh-users 17636
- From: Jan Eike von Seggern <jan.eike.von.seggern@xxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Caching variables during completion
- Date: Wed, 13 Feb 2013 10:44:09 +0100
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author