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 19857
 
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
 
- To: 246305-submitter@xxxxxxxxxxxxxxx
 
- Subject: Re: Bug#246305: zsh: completion for sudo doesn't add commands under root's path
 
- Date: Fri, 30 Apr 2004 16:25:12 +0000
 
- Cc: zsh-workers@xxxxxxxxxx
 
- In-reply-to: <20040430153937.GA4644@xxxxxxxxxxx>
 
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
 
- References: <877jw0gzp3.wl@xxxxxxxxxxxxxxxxxxxxxxxxxx> 	<20040428130449.GA3198@xxxxxxxxxxx> 	<1040428160206.ZM29342@xxxxxxxxxxxxxxxxxxxxxxx> 	<20040430122712.GA2985@xxxxxxxxxxx> 	<17443.1083331282@xxxxxxxxxxxxxxxxxxxxx> 	<20040430153937.GA4644@xxxxxxxxxxx>
 
On Apr 30, 11:39am, Clint Adams wrote:
}
} > If you use a style, give it a generic sounding name then. Perhaps it
} > could be looked up from _command_names instead of _sudo. Keep in mind
} > that people might want to do things like add to the existing path or
} > remove `.'.
} 
} So... it should be eval'd?
If it needs eval-ing, that can be done with "zstyle -e ...".
I think he means that it should have several possible values, e.g. (just
throwing out ideas):
zstyle ':completion:*:sudo:*' command-path delete . .. '../*'
zstyle ':completion:*:sudo:*' command-path append /usr/local/bin /opt/bin
zstyle ':completion:*:sudo:*' command-path prepend ~/bin /usr/local/bin
zstyle ':completion:*:sudo:*' command-path assign /bin /usr/bin /usr/sbin
(This begs the question of what to do if you want to add things at both
the end and the beginning.)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author