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

Re: sudo autocompletion



On 10 Feb 2020, at 11:40, Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> I think it ought at least to check if the /sbin directories exist.

Won't they just be ignored if they don't? It might be a little nicer to return
like ${(u)^reply}(/N), though

On 10 Feb 2020, at 11:40, Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> Possibly they should also go in front of the path --- that's one of the
> points about "secure".

Not sure about that. We only want to use this for completion, not actually
resolving commands, especially if we're doing it this way where we just
blindly replace */bin by */sbin (as opposed to white-listing a few known
directories like bash does). I don't think any external commands are called
after this anyway, but...

On 10 Feb 2020, at 11:40, Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> On the issue of setting the style at this point --- the usual behaviour
> is only to change the default locally rather than also set the style, but
> that's probably difficult here, so I don't think it's a particularly big
> deal.

I was initially going to have it update path locally, and again it'd probably
be fine here, but i figured it'd be preferable to keep that logic in
_command_names

dana



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