zsh-workers
 help / color / mirror / code / Atom feed
* detecting superuser condition in completion
@ 2002-02-27  8:25 Borsenkow Andrej
  2002-02-27  9:17 ` Oliver Kiddle
  0 siblings, 1 reply; 2+ messages in thread
From: Borsenkow Andrej @ 2002-02-27  8:25 UTC (permalink / raw)
  To: 'Zsh hackers list'

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: detecting superuser condition in completion
  2002-02-27  8:25 detecting superuser condition in completion Borsenkow Andrej
@ 2002-02-27  9:17 ` Oliver Kiddle
  0 siblings, 0 replies; 2+ messages in thread
From: Oliver Kiddle @ 2002-02-27  9:17 UTC (permalink / raw)
  To: zsh-workers

 --- Borsenkow Andrej <Andrej.Borsenkow@mow.siemens.ru> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-02-27  9:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-27  8:25 detecting superuser condition in completion Borsenkow Andrej
2002-02-27  9:17 ` Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).