zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: PATCH: avoid hashing command names twice on Cygwin
Date: Fri, 26 Jan 2001 14:32:24 +0000	[thread overview]
Message-ID: <Tc0a8890c5157f15c41@mailsweeper01.cambridgesiliconradio.com> (raw)
In-Reply-To: Your message of "Fri, 26 Jan 2001 16:36:53 +0300." <000301c0879d$0b59bea0$21c9ca95@mow.siemens.ru>

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

It will be confusing if completion doesn't recognise foo.exe as an
executable under its full name.  Hashing both may not be necessary, but it
should preferably be stored and retrieved in such way that both are used
whenever an executable is being searched for.

A natural extension for DOS- and Windows-like environments which could even
be an option on other systems (you wouldn't want it turned on by default)
would be to do what 4DOS used to and take a list of executable suffixes and
interpreters, which could be taken from an array (ordinary so as to specify
precedence), e.g. 

zexecsufixes=(com: exe: pl:'/c/Programe Files/perl/perl.exe' zsh:zsh sh:bash)

where an empty string specifies that the file is already in an executable
format. That suggests that the programme would be stored under it's full
name, or at least with a suitable flag, but returned for completion both as
that and the basename.  But that's a lot of work.  (You could extend it to
shell functions, builtins etc., but that would probably just be asking for 
confusion.)

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


      reply	other threads:[~2001-01-26 14:32 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
2001-01-26 14:32   ` Peter Stephenson [this message]

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=Tc0a8890c5157f15c41@mailsweeper01.cambridgesiliconradio.com \
    --to=pws@csr.com \
    --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).