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

Re: sudo autocompletion



Andrey Butirsky wrote on Sun, 09 Feb 2020 20:14 +0300:
> On 09.02.2020 20:03, Roman Perepelitsa wrote:
> > What doesn't work for you out of the box?  
> 
> What doesn't work is completion for 'privileged' commands, those in 
> /usr/sbin/ etc.
> 
> I know I haven't PATH set for those, but in bash all of these just work.
> 

Something like this:

zstyle ':completion:*:*:sudo:*' command-path $path ${path//bin/sbin}

Adjust the stuff after «command-path» as needed.



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