Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh: correct 'sudo' to '_sudo' [nyae]?

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

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   

Messages sorted by: Reverse Date, Date, Thread, Author