Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: detecting superuser condition in completion
- X-seq: zsh-workers 16726
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: detecting superuser condition in completion
- Date: Wed, 27 Feb 2002 09:17:46 +0000 (GMT)
- In-reply-to: <001501c1bf68$4a8cccd0$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
--- Borsenkow Andrej <Andrej.Borsenkow@xxxxxxxxxxxxxx> wrote:
> 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 ...
A variable seems best to me. _is_superuser could only differentiate
root as opposed to any user (less useful after su <user> -c ...) and
it'd probably need a variable underneath to work anyway.
Oliver
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author