Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Yet another completion question
- X-seq: zsh-users 8143
- From: William Scott <wgscott@xxxxxxxxxxxxxxxxxx>
- To: DervishD <zsh@xxxxxxxxxxxx>
- Subject: Yet another completion question
- Date: Fri, 29 Oct 2004 08:17:21 -0700 (PDT)
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20041027184948.GA10764@DervishD>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hi Folks:
I have a completion that works in the old form and would like
to write a completion function. This is for a command called
"open" on Apple OS X.
eg: open -a Netscape
is the functional equivalent of clicking on the Netscape application,
eg: open -a Microsoft\ Word
opens the devil's ware, etc.
I have a function that produces a list of applications, complete with
escaped spaces, like this:
Microsoft\ Word
NFS\ Manager
Nemo_invoker
NetInfo\ Manager
NetRestore
NetRestore\ Helper
Netscape
and I am using compctl to read in a file it produces, since this takes
awhile to produce:
compctl -f -x 'c[-1,-a] p[2,2]' -s "$(cat ~/.zshapplist)" \
-M 'm:{A-Za-z}={a-zA-Z} r: ||[^ ]=**' -- open
This works. I figured out the -s was critical to getting this to
work right with the applications having escaped spaces.
But what I would like to do is use the new completion system and cache
these completions in the proper z-shell manner.
I can't seem to figure out how to use compadd syntax in analogy to the -s
option of compctl.
I would be grateful for any and all suggestions.
Bill Scott
William G. Scott
Associate Professor
Department of Chemistry and Biochemistry
and The Center for the Molecular Biology of RNA
Sinsheimer Laboratories
University of California at Santa Cruz
Santa Cruz, California 95064
USA
Messages sorted by:
Reverse Date,
Date,
Thread,
Author