zsh-users
 help / color / mirror / code / Atom feed
* zsh: correct 'sudo' to '_sudo' [nyae]?
@ 2001-12-19  9:00 Hannu Koivisto
  2002-01-06  3:03 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Hannu Koivisto @ 2001-12-19  9:00 UTC (permalink / raw)
  To: Zsh Users' List

Greetings,

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.  rehash doesn't help, but
"which sudo" always fixes the problem.  What could be the culprit?

zsh 4.0.4, HP-UX 11i.

-- 
Hannu
Please don't send copies of list mail


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh: correct 'sudo' to '_sudo' [nyae]?
  2001-12-19  9:00 zsh: correct 'sudo' to '_sudo' [nyae]? Hannu Koivisto
@ 2002-01-06  3:03 ` Bart Schaefer
  2002-01-07 12:54   ` Hannu Koivisto
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2002-01-06  3:03 UTC (permalink / raw)
  To: Hannu Koivisto, zsh-users

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.  rehash doesn't help, but
} "which sudo" always fixes the problem.  What could be the culprit?

It's not surprising that "rehash" doesn't help, as all that does is
empty the command hash table, and correction treats the contents of the
command hash table as the correct spellings.

Does "rehash -f" (both empty the command hash and refill it again) help?

Do you use the HASH_LIST_ALL option?  Unless that option is set, the
command hash table does not automatically fill itself during correction.

-- 
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   


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh: correct 'sudo' to '_sudo' [nyae]?
  2002-01-06  3:03 ` Bart Schaefer
@ 2002-01-07 12:54   ` Hannu Koivisto
  2002-01-09 17:34     ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Hannu Koivisto @ 2002-01-07 12:54 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

"Bart Schaefer" <schaefer@brasslantern.com> writes:

> 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.  rehash doesn't help, but
>} "which sudo" always fixes the problem.  What could be the culprit?
> 
> It's not surprising that "rehash" doesn't help, as all that does is
> empty the command hash table, and correction treats the contents of the
> command hash table as the correct spellings.

Ok, I tried it just because it has helped for the same problem when
I have installed new software.

> Does "rehash -f" (both empty the command hash and refill it again) help?

No.

> Do you use the HASH_LIST_ALL option?  Unless that option is set, the
> command hash table does not automatically fill itself during correction.

I don't use it but I tried setting it and it changed nothing.

-- 
Hannu


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh: correct 'sudo' to '_sudo' [nyae]?
  2002-01-07 12:54   ` Hannu Koivisto
@ 2002-01-09 17:34     ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2002-01-09 17:34 UTC (permalink / raw)
  To: Hannu Koivisto; +Cc: zsh-users

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   


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-01-09 17:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-19  9:00 zsh: correct 'sudo' to '_sudo' [nyae]? Hannu Koivisto
2002-01-06  3:03 ` Bart Schaefer
2002-01-07 12:54   ` Hannu Koivisto
2002-01-09 17:34     ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).