Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Updated _acroread completer



On 15 Apr, Haakon Riiser wrote:
> I have now tried the non-local variable trick, and it works just
> like I expected.  I also noticed that the zsh completion system
> has a set of caching functions (_store_cache, _retrieve_cache and
> _cache_invalid).  These functions apparently store data on disk,

I never use those and don't really like them. I prefer completion to be
slow the first time I complete something than for it to be out-of-date.

> # The output of acroread -version cannot be piped to stdout for some reason, so
> # the version number must be read from ACROREAD-PREFIX/Reader/AcroVersion.
> # Since acroread might have been started via a wrapper script, the only
> # failsafe way of determining ACROREAD-PREFIX is to look at the output of
> # acroread -help.

Unfortunately, this doesn't work on the system I tried it on, using
Adobe's rpm. /usr/bin/acroread is a symbolic like to
/usr/local/Adobe/Acrobat7.0/bin/acroread. Handling that involves using ls
to get the symlink destination.

Is acroread always a script? The following works well (and very quickly)
on any system I have access to:
  grep '^ver=' =acroread

>From a completion function, we can use $commands[$words[1]] instead
of =acroread.

Oliver



Messages sorted by: Reverse Date, Date, Thread, Author