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

RE: Passing state information from one completion function to another?



>
> 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.

-andrej



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