Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
compctl
- X-seq: zsh-users 395
- From: Julio Garcia <julio@xxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx (zsh mailing list)
- Subject: compctl
- Date: Fri, 6 Sep 1996 15:52:32 -0700 (MDT)
Hi,
I have been playing with compctl and have a question regarding the -l
option. I have a simple command that allows me to run other commands as
root (or any other user). 99% of the time, I run it something like
this:
sys [-u <user>] cmd <cmd options/args/...>
I have the following comctl for it and it works pretty well:
compctl -x 'p[1] s[-u]' -u - \
'p[2] w[1,-u]' -u - \
'p[1]' -c - \
'p[2] W[1,-u*]' -c - \
'p[3] w[1,-u]' -c \
-- sys
The problem is that I would like smart completion on the command that
is passed in to sys. I tried with some success to use the -l option:
compctl -x 'p[1] s[-u]' -u - \
'p[2] w[1,-u]' -u - \
'p[1]' -c - \
'p[2] W[1,-u*]' -c - \
'p[3] w[1,-u]' -c - \
'W[-1,*]' -l '' \
-- sys
This also works most of the time. It starts to get confused with
things like
sys -u root exec ...
or
exec sys -u root ...
This may be too much to ask. It's no big deal, but I am curious
about it.
Any thoughts?
--
Julio Garcia - julio@xxxxxxxxx - http://spyder.fc.hp.com/julio/
- (970) 229-3168 - FAX (970) 229-7182
Messages sorted by:
Reverse Date,
Date,
Thread,
Author