delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-ID: | <42AE20F2.4000409@scytek.de> |
Date: | Mon, 13 Jun 2005 20:12:34 -0400 |
From: | Volker Quetschke <quetschke AT scytek DOT de> |
User-Agent: | Mozilla Thunderbird 1.0.2 (Windows/20050317) |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: tcsh doesn't find commands that end with .exe |
References: | <42ADA78B DOT 9040300 AT scytek DOT de> <20050613160117 DOT GC3522 AT calimero DOT vinschen DOT de> <42ADAFC9 DOT 9090401 AT scytek DOT de> <20050613163537 DOT GA11778 AT calimero DOT vinschen DOT de> |
In-Reply-To: | <20050613163537.GA11778@calimero.vinschen.de> |
X-IsSubscribed: | yes |
--------------enig734412562CB7203A9C58B16D Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit >>>>I have the following problem with tcsh: >>>> >>>>tcsh doesn't find the program if the .exe extension is given. whoami is >>>>only an example, this also happens to other programs. >>>> >>>>[quetschke AT Macros ~]$ which whoami >>>>/usr/bin/whoami >>>>[quetschke AT Macros ~]$ which whoami.exe >>>>whoami.exe: Command not found. >>>>(snip) >>> >>>That's by design. >> >>You mean the grand design that leads earth and all its inhabitants >>to eternal bliss? >> >>And if so, it seems to have a flaw: >> >>[quetschke AT Macros ~]$ which cmd.exe >>/cygdrive/c/WINDOWS/system32/cmd.exe >>[quetschke AT Macros ~]$ which cmd >>/cygdrive/c/WINDOWS/system32/cmd >> >>Care to elaborate where the difference comes from? >> >>Why should I not be allowed to start a program with it's >>real name? And why does it work sometimes? > > Dunno why it prints cmd.exe but by design (minus flaws) tcsh only > starts applications given w/o path if the application is in the > internal hash table. The internal hash table stores the application > names w/o .exe suffix. And all lower case, (cygwin only). Try something like this: Put progA.exe in /mytestexedir and add that to your PATH. Start a tcsh and type "prog<TAB>" [quetschke AT Macros ~]$ prog progA progman Aha progA, good try this. [quetschke AT Macros ~]$ progA progA: Command not found. Hmmm, try proga: [quetschke AT Macros ~]$ proga (here will be the output of progA.exe) Well, better don't use mixed cases. > If you need something different: http://cygwin.com/acronyms/#PTC. The maintainer might think about removing "strlwr(dp->d_name);" from line 776 of sh.exec.c . Oh and somehow tcsh's hash cannot handle directories with very many files (i.e. /cygdrive/c/WINDOWS/system32/) therefore it doesn't seem to hash them and does a real lookup instead. (I didn't look hard enough at the code to really proove this, but just copy everything from /cygdrive/c/WINDOWS/system32/ into /mytestexedir/ and you will see that proga progA.exe proga.exe can now be found and accessed. Just like cmd CMD cmd.exe CMD.EXE .... ) Volker P.S.: $ ll /mytestexedir/ | wc -l 2051 -- PGP/GPG key (ID: 0x9F8A785D) available from wwwkeys.de.pgp.net key-fingerprint 550D F17E B082 A3E9 F913 9E53 3D35 C9BA 9F8A 785D --------------enig734412562CB7203A9C58B16D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCriD3PTXJup+KeF0RAlV+AKCIvYSfzqjrGor5yKPlJdGDV5LbxgCfSjrr cHZWyo7EIfEtPR2T1d6HT3w= =p0Ev -----END PGP SIGNATURE----- --------------enig734412562CB7203A9C58B16D--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |