Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Passing state information from one completion function to another?
- X-seq: zsh-workers 12634
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "ZSH workers mailing list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Passing state information from one completion function to another?
- Date: Tue, 15 Aug 2000 11:31:06 +0400
- Importance: Normal
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
What I'd like to have is to list only my own processes in "normal" case and
everything in case of root. This works with a single exception of sudo (and
may be su) - in this case completion happens in current user context and does
not know if it was root or not.
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? Of course,
that shoould be cleaned up after completion exits. This may be useful in other
cases as well - some generic test "if command is to be executed as root/other
user"
-andrej
Have a nice DOS!
B >>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author