zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "ZSH workers mailing list" <zsh-workers@sunsite.auc.dk>
Subject: RE: PATCH: avoid hashing command names twice on Cygwin
Date: Fri, 26 Jan 2001 16:36:53 +0300	[thread overview]
Message-ID: <000301c0879d$0b59bea0$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <000201c0879b$76bca8d0$21c9ca95@mow.siemens.ru>


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


  reply	other threads:[~2001-01-26 13:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-26 13:25 Andrej Borsenkow
2001-01-26 13:36 ` Andrej Borsenkow [this message]
2001-01-26 14:32   ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000301c0879d$0b59bea0$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).