zsh-users
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Andrey Butirsky <butirsky@gmail.com>
Cc: Roman Perepelitsa <roman.perepelitsa@gmail.com>,
	Zsh Users <zsh-users@zsh.org>
Subject: Re: sudo autocompletion
Date: Mon, 10 Feb 2020 03:02:19 +0000	[thread overview]
Message-ID: <20200210030219.527a3ccf@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <1770be62-54d8-70a6-8b05-cfc98faa9b9f@gmail.com>

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.

  reply	other threads:[~2020-02-10  3:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-09 16:52 Andrey Butirsky
2020-02-09 17:03 ` Roman Perepelitsa
2020-02-09 17:14   ` Andrey Butirsky
2020-02-10  3:02     ` Daniel Shahaf [this message]
2020-02-10  7:52       ` Andrey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200210030219.527a3ccf@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=butirsky@gmail.com \
    --cc=roman.perepelitsa@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).