Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#246305: zsh: completion for sudo doesn't add commands under root's path
- X-seq: zsh-workers 19854
- From: Clint Adams <clint@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Bug#246305: zsh: completion for sudo doesn't add commands under root's path
- Date: Fri, 30 Apr 2004 08:27:12 -0400
- Cc: zsh-workers@xxxxxxxxxx, 246305@xxxxxxxxxxxxxxx
- In-reply-to: <1040428160206.ZM29342@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <877jw0gzp3.wl@xxxxxxxxxxxxxxxxxxxxxxxxxx> <20040428130449.GA3198@xxxxxxxxxxx> <1040428160206.ZM29342@xxxxxxxxxxxxxxxxxxxxxxx>
> How about:
>
> local -a +h commands path
> path=( ... )
> compadd -a commands
>
> The more interesting question, I think, would be where to get an accurate
> value for root's sudo path without first being root.
Well, you could do the equivalent of "strings =sudo | grep sbin:", but
that seems ugly and error-prone.
I'd suggest using a sane default which can be overridden with zstyle.
I have a sneaking suspicion that sudo isn't the only command for which
it would make sense to override the path for _command_names though.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author