From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4544 invoked from network); 30 Apr 2004 12:28:10 -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 12:28:10 -0000 Received: (qmail 29112 invoked from network); 30 Apr 2004 12:27:58 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Apr 2004 12:27:58 -0000 Received: (qmail 29661 invoked by alias); 30 Apr 2004 12:27:47 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19854 Received: (qmail 29650 invoked from network); 30 Apr 2004 12:27:47 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by sunsite.dk with SMTP; 30 Apr 2004 12:27:44 -0000 Received: (qmail 28624 invoked from network); 30 Apr 2004 12:27:43 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 30 Apr 2004 12:27:41 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id BC8C070047; Fri, 30 Apr 2004 08:27:12 -0400 (EDT) Date: Fri, 30 Apr 2004 08:27:12 -0400 From: Clint Adams To: Bart Schaefer Cc: zsh-workers@sunsite.dk, 246305@bugs.debian.org Subject: Re: Bug#246305: zsh: completion for sudo doesn't add commands under root's path Message-ID: <20040430122712.GA2985@scowler.net> References: <877jw0gzp3.wl@broken.int.wedontsleep.org> <20040428130449.GA3198@scowler.net> <1040428160206.ZM29342@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1040428160206.ZM29342@candle.brasslantern.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=6.0 tests=BAYES_00 autolearn=no version=2.63 X-Spam-Hits: -4.9 > How about: > > local -a +h commands path > path=( ... ) > compadd -a commands > > The more interesting question, I think, would be where to get an accurate > value for root's sudo path without first being root. Well, you could do the equivalent of "strings =sudo | grep sbin:", but that seems ugly and error-prone. I'd suggest using a sane default which can be overridden with zstyle. I have a sneaking suspicion that sudo isn't the only command for which it would make sense to override the path for _command_names though.