Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: PATCH: avoid hashing command names twice on Cygwin
- X-seq: zsh-workers 13391
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "ZSH workers mailing list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: RE: PATCH: avoid hashing command names twice on Cygwin
- Date: Fri, 26 Jan 2001 16:36:53 +0300
- Importance: Normal
- In-reply-to: <000201c0879b$76bca8d0$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
>
> Under Cygwin every foo.exe was hashed twice - as foo and foo.exe.
>
> Actually, the code was funny. It contained one block that was executed
> unconditionally and exactly the same later under condition.
>
Hmm ... I believe, this was intentional. But, under Cygwin, foo.exe *is* foo -
stat(foo) returns the same as stat(foo.exe) if foo does not exist. Also, IIRC
_WIN32 was removed from current development version of Cygwin, so the above
would be resolved in favour of foo.exe instead of foo.
We could be more intellegent and test if stat(foo) != stat(foo.exe) to decide
if we should add both. Is it worth troubles?
OTOH it is just command table; for all purposes hashing foo is the same as
hashing foo.exe except very rare cases when both exist.
Comments?
-andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author