Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Passing state information from one completion function to another?
- X-seq: zsh-workers 12647
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>, "ZSH workers mailing list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: Passing state information from one completion function to another?
- Date: Tue, 15 Aug 2000 15:44:30 +0000
- In-reply-to: <000101c0068a$c6470310$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <000101c0068a$c6470310$21c9ca95@xxxxxxxxxxxxxx>
On Aug 15, 11:31am, Andrej Borsenkow wrote:
} Subject: Passing state information from one completion function to another
}
} Is it possible for _sudo to set some state info (notably, that we are after
} sudo at all and user name) that can be queried by other functions?
Well, _killall (for example) uses $EUID to decide what process IDs to show.
So we can use `local -h EUID' in _sudo to make other completion functions
believe that the effective user ID has changed.
The question is, do we simply always set the local EUID to 0? Do we set it
to an EUID specified by a style? Or do we compute it somehow by parsing out
the `-u' option argument? Probably one of the latter two; parsing probably
requires adding a state for the -u option and an extra call to _arguments,
or some such.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author