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

detecting superuser condition in completion



Sometimes some options make sense only for superuser. Unfortunately
testing for EUID is not enough because it does not work for completions
after sudo (at least).

Brute force method is to make _sudo set some variable and test for it
later. Any better idea? If not, I guess we should agree on variable name
or provide some helper like

_is_superuser && _wanted ...

Comments?

-andrej



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