From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25653 invoked from network); 9 Jan 2002 17:35:01 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 9 Jan 2002 17:35:01 -0000 Received: (qmail 7113 invoked by alias); 9 Jan 2002 17:34:39 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4572 Received: (qmail 7101 invoked from network); 9 Jan 2002 17:34:38 -0000 From: "Bart Schaefer" Message-Id: <1020109173433.ZM12533@candle.brasslantern.com> Date: Wed, 9 Jan 2002 17:34:32 +0000 In-Reply-To: <87itaecoeu.fsf@lynx.ionific.com> Comments: In reply to Hannu Koivisto "Re: zsh: correct 'sudo' to '_sudo' [nyae]?" (Jan 7, 2:54pm) References: <87ofkvlh37.fsf@lynx.ionific.com> <1020106030307.ZM7583@candle.brasslantern.com> <87itaecoeu.fsf@lynx.ionific.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Hannu Koivisto Subject: Re: zsh: correct 'sudo' to '_sudo' [nyae]? Cc: zsh-users@sunsite.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jan 7, 2:54pm, Hannu Koivisto wrote: } Subject: Re: zsh: correct 'sudo' to '_sudo' [nyae]? } } > On Dec 19, 11:00am, Hannu Koivisto wrote: } >} } >} I always get this message when I start a new shell (whether by } >} logging to a system or by saying "zsh" when I'm logged on) and try } >} to run sudo even though sudo is in path. } } > Does "rehash -f" (both empty the command hash and refill it again) help? } } No. } } > Do you use the HASH_LIST_ALL option? } } I don't use it but I tried setting it and it changed nothing. OK, that means there can only be one other reason for this happening: the directory containing `sudo' is not readable. That is, it has execute permission set so that by giving the full path to `sudo' you are allowed to execute the file, but an `ls' on that directory would deny permission. In this event, `which' searches for and adds to the hash table the single command by full name, and therefore succeeds, whereas the spell checker and `rehash -f' try to examine all names in the directory and therefore fail. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net