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 12639
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: RE: Passing state information from one completion function to another?
- Date: Tue, 15 Aug 2000 11:13:00 +0200 (MET DST)
- In-reply-to: "Andrej Borsenkow"'s message of Tue, 15 Aug 2000 12:42:32 +0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Andrej Borsenkow wrote:
> > Shouldn't it be enough to use `zstyle -e' and test if $words contains
> > `sudo' (probably as the first word)?
>
>
> Ehh but if I understand it correctly, in case of
>
> sudo kill TAB
>
> $words is modified to be just (kill), removing sudo and any of it's option? In
> more general case
>
> sudo -u foo kill TAB
>
> it would be nice to know that we are su'ing to user foo and not to root.
>
> The problem is, I need this information not when completing sudo but when
> completing command after sudo.
Ouch. Right. Would testing $BUFFER be enough?
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author