From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id f0afbcd2 for ; Mon, 10 Feb 2020 18:58:15 +0000 (UTC) Received: (qmail 24135 invoked by alias); 10 Feb 2020 18:58:07 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45412 Received: (qmail 20097 invoked by uid 1010); 10 Feb 2020 18:58:07 -0000 X-Qmail-Scanner-Diagnostics: from mail-yb1-f181.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25718. spamassassin: 3.4.2. Clear:RC:0(209.85.219.181):SA:0(-1.9/5.0):. Processed in 3.529283 secs); 10 Feb 2020 18:58:07 -0000 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.219.181 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=OfHYLX3POzsYK+GlxlKz729LPP4kkngNb8VVVZYkNi8=; b=ay76lpglGcbEKG/ELSJvxZQHjFVB0sksIsNcbXPaqL+SNYt8tWj4Gd2Dr4NTHhLhC+ OxworT+m0dWSy2Py8U9SwakG1vqNe6OoDQGP3DaZHI4fgDGZIvsHKkkC078t7um7p+4s sJxUoXfdKQaa4A4hCEuZS9BYuaPL98ZORYFIGu5R7ws6jqyxvPa+QxGKooTvffr33mWB u2roWbV7LM8jlABac8BmikD1Bx/kw+NKe7vEBTIIjcfO8KHsl+rmAwgK+hZUHNx7Wl/0 Z5kf6bEt5no1OvhWT0IxLpEJ5Hxwq4DDNi7dJxY7zZXB5duQM2PpgqcbN7dyJzipO9E7 3ogQ== X-Gm-Message-State: APjAAAViMhNZzayQUGRp0o+8j0xx1e9m5WN03sUlA6mX8MZN+I6mJ10t z92jkn88J9R45OMDa0IfvbvNMw== X-Google-Smtp-Source: APXvYqzwvJxbLR8AIzSyHZ+UJJXhcHCVbj/Pl6sHM5iQ4VhiIXH1qrrMsHbLF73q55Kac7oGqVTrjw== X-Received: by 2002:a05:6902:4c2:: with SMTP id v2mr2369112ybs.351.1581361049846; Mon, 10 Feb 2020 10:57:29 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: sudo autocompletion From: dana In-Reply-To: <1581356458.19604.3.camel@samsung.com> Date: Mon, 10 Feb 2020 12:57:27 -0600 Cc: Zsh hackers list Content-Transfer-Encoding: quoted-printable Message-Id: References: <912d22db-8a8f-90f2-6738-f9f395994dcb@gmail.com> <1770be62-54d8-70a6-8b05-cfc98faa9b9f@gmail.com> <20200210030219.527a3ccf@tarpaulin.shahaf.local2> <1581356458.19604.3.camel@samsung.com> To: Peter Stephenson X-Mailer: Apple Mail (2.3445.104.11) On 10 Feb 2020, at 11:40, Peter Stephenson = 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 = 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 = 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