From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23614 invoked from network); 30 Apr 2004 18:26:39 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by ns1.primenet.com.au with SMTP; 30 Apr 2004 18:26:39 -0000 Received: (qmail 6425 invoked from network); 30 Apr 2004 18:26:28 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Apr 2004 18:26:28 -0000 Received: (qmail 5307 invoked by alias); 30 Apr 2004 18:26:26 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19857 Received: (qmail 5272 invoked from network); 30 Apr 2004 18:26:26 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by sunsite.dk with SMTP; 30 Apr 2004 18:26:23 -0000 Received: (qmail 6243 invoked by uid 1002); 30 Apr 2004 18:26:22 -0000 Received: from wbar3.sjo1-4-11-009-147.sjo1.dsl-verizon.net (HELO candle.brasslantern.com) (4.11.9.147) by a.mx.sunsite.dk with SMTP; 30 Apr 2004 16:25:16 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id i3UGPC701311; Fri, 30 Apr 2004 09:25:12 -0700 X-Authentication-Warning: candle.brasslantern.com: schaefer set sender to schaefer@closedmail.com using -f From: Bart Schaefer Message-Id: <1040430162512.ZM1310@candle.brasslantern.com> Date: Fri, 30 Apr 2004 16:25:12 +0000 In-Reply-To: <20040430153937.GA4644@scowler.net> Comments: In reply to Clint Adams "Re: Bug#246305: zsh: completion for sudo doesn't add commands under root's path" (Apr 30, 11:39am) References: <877jw0gzp3.wl@broken.int.wedontsleep.org> <20040428130449.GA3198@scowler.net> <1040428160206.ZM29342@candle.brasslantern.com> <20040430122712.GA2985@scowler.net> <17443.1083331282@trentino.logica.co.uk> <20040430153937.GA4644@scowler.net> X-Mailer: Z-Mail (5.0.0 30July97) To: 246305-submitter@bugs.debian.org Subject: Re: Bug#246305: zsh: completion for sudo doesn't add commands under root's path Cc: zsh-workers@sunsite.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Status: Yes, hits=7.7 required=6.0 tests=BAYES_44,RCVD_IN_DYNABLOCK, RCVD_IN_NJABL,RCVD_IN_NJABL_DIALUP,RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 7.7 On Apr 30, 11:39am, Clint Adams wrote: } } > If you use a style, give it a generic sounding name then. Perhaps it } > could be looked up from _command_names instead of _sudo. Keep in mind } > that people might want to do things like add to the existing path or } > remove `.'. } } So... it should be eval'd? If it needs eval-ing, that can be done with "zstyle -e ...". I think he means that it should have several possible values, e.g. (just throwing out ideas): zstyle ':completion:*:sudo:*' command-path delete . .. '../*' zstyle ':completion:*:sudo:*' command-path append /usr/local/bin /opt/bin zstyle ':completion:*:sudo:*' command-path prepend ~/bin /usr/local/bin zstyle ':completion:*:sudo:*' command-path assign /bin /usr/bin /usr/sbin (This begs the question of what to do if you want to add things at both the end and the beginning.)