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

Re: sudo autocompletion



On Sun, Feb 9, 2020 at 5:53 PM Andrey Butirsky <butirsky@xxxxxxxxx> wrote:
>
> Hi,
>
> what is the most "canonical" way to get sudo <command> autocompleted for
> casual user?

It just works for me after calling compinit without having to set any
options or styles.

  sudo -u ro<TAB>  => romka (my username)
  sudo -u romka fgr<TAB> => fgrep
  sudo -u romka fgrep --a => --after-context

What doesn't work for you out of the box?

Roman.



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