This is the mail archive of the
mailing list for the Cygwin project.
RE: Zsh observations
- To: "Andrej Borsenkow" <Andrej dot Borsenkow at mow dot siemens dot ru>, <cygwin at cygwin dot com>
- Subject: RE: Zsh observations
- From: Michael Schaap <cygwin at mscha dot com>
- Date: Thu, 05 Jul 2001 11:25:15 +0200
- References: <email@example.com>
At 07:59 5-7-2001, Andrej Borsenkow wrote:
>Zsh relies on system execve to find command. Basically, it does
>for dir in path
> execve dir/cmd
>until it succeeds. We recently have a brief discussion on zsh-workers about
>it. Irrespectivley if you consider it a bug or feature this was around for a
>very long time. So the above lets suspect problem in Cygwin exec - sometimes
>it fails to execute /a/hello.exe. Can you reliably reproduce it?
Yes, I've figured it out.
It only happens when "setopt correct" is set, the first instance of a file
in the PATH has a .exe extension, and the second doesn't. Here's how to
I created an executable /tmp/a/dummy.exe which prints "a", and a script
"/tmp/b/dummy" which prints "b".
Move all zsh initialisation files (/etc/z* and ~/.z*) away, and open a new
Open a new zsh window, and type:
% setopt correct
Conclusion: don't use "setopt correct" under Cygwin. :-(
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html