Re: tcsh doesn't find commands that end with .exe
On Jun 14 16:22, Volker Quetschke wrote: Corinna Vinschen wrote: (...) And all lower case, (cygwin only). Try something like this: Well, it seemed like a good idea way back when. But I agree that it's probably not quite contemporary anymore. Try the below patch. It removes the 'all lowercase' and it allows to enter all tools with exe suffix. If that's basically what you had in mind, I'll send the patch upstream and create a new Cygwin tcsh release. Thanks for patching this! I was mainly concerned about the unpredictability when starting different programs ending in .exe. I didn't know that it was (before your patch) by design. But i like the new design better ;) I found another variation of my testcase showing that the failure in the path hashing also happens in directories with less files and that it doesn't disable the hashing for those directories completely. Unpatched standard cygwin tcsh: [EMAIL PROTECTED] ~]$ which gcc.exe /usr/bin/gcc.exe [EMAIL PROTECTED] ~]$ which whoami.exe whoami.exe: Command not found. [EMAIL PROTECTED] ~]$ which whoami /usr/bin/whoami Doesn't happen with the patched tcsh. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin@cygwin.com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: tcsh doesn't find commands that end with .exe
On Jun 13 20:12, Volker Quetschke wrote: tcsh doesn't find the program if the .exe extension is given. whoami is only an example, this also happens to other programs. [...] And all lower case, (cygwin only). Try something like this: Well, it seemed like a good idea way back when. But I agree that it's probably not quite contemporary anymore. Try the below patch. It removes the 'all lowercase' and it allows to enter all tools with exe suffix. If that's basically what you had in mind, I'll send the patch upstream and create a new Cygwin tcsh release. Corinna --- sh.exec.c.ORIG 2005-06-14 11:04:07.603070900 +0200 +++ sh.exec.c 2005-06-14 11:17:34.750423000 +0200 @@ -771,10 +771,12 @@ dohash(vv, c) strcasecmp(dp-d_name[ext], .bat) == 0 || strcasecmp(dp-d_name[ext], .com) == 0)) { - dp-d_name[ext] = '\0'; #if defined(__CYGWIN__) - strlwr((char *)item); + /* Also store the variation with extension. */ + hashval = hashname(str2short(dp-d_name)); + bis(hashval, i); #endif /* __CYGWIN__ */ + dp-d_name[ext] = '\0'; } } #endif /* _UWIN || __CYGWIN__ */ --- tw.parse.c.ORIG 2005-06-14 11:04:43.541850300 +0200 +++ tw.parse.c 2005-06-14 11:05:25.886023600 +0200 @@ -920,12 +920,7 @@ tw_collect_items(command, looking, exp_d if ((ext 0) (strcasecmp((char *)item[ext], .exe) == 0 || strcasecmp((char *)item[ext], .bat) == 0 || strcasecmp((char *)item[ext], .com) == 0)) - { - item[ext] = '\0'; -#if defined(__CYGWIN__) - strlwr((char *)item); -#endif /* __CYGWIN__ */ - } + item[ext] = '\0'; } #endif /* _UWIN || __CYGWIN__ */ exec_check = flags TW_EXEC_CHK; -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin@cygwin.com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: tcsh doesn't find commands that end with .exe
Corinna Vinschen wrote: (...) And all lower case, (cygwin only). Try something like this: Well, it seemed like a good idea way back when. But I agree that it's probably not quite contemporary anymore. Try the below patch. It removes the 'all lowercase' and it allows to enter all tools with exe suffix. If that's basically what you had in mind, I'll send the patch upstream and create a new Cygwin tcsh release. Thanks for patching this! I was mainly concerned about the unpredictability when starting different programs ending in .exe. I didn't know that it was (before your patch) by design. But i like the new design better ;) I found another variation of my testcase showing that the failure in the path hashing also happens in directories with less files and that it doesn't disable the hashing for those directories completely. Unpatched standard cygwin tcsh: [EMAIL PROTECTED] ~]$ which gcc.exe /usr/bin/gcc.exe [EMAIL PROTECTED] ~]$ which whoami.exe whoami.exe: Command not found. [EMAIL PROTECTED] ~]$ which whoami /usr/bin/whoami This doesn't feel like a cygwin bug, but cygwin's tcsh makes it easier to find it. I'll try to write a consistent bug-report to the tcsh people. Thanks Volker -- PGP/GPG key (ID: 0x9F8A785D) available from wwwkeys.de.pgp.net key-fingerprint 550D F17E B082 A3E9 F913 9E53 3D35 C9BA 9F8A 785D signature.asc Description: OpenPGP digital signature
Re: tcsh doesn't find commands that end with .exe
On Jun 13 11:34, Volker Quetschke wrote: 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. [EMAIL PROTECTED] ~]$ which whoami /usr/bin/whoami [EMAIL PROTECTED] ~]$ which whoami.exe whoami.exe: Command not found. [EMAIL PROTECTED] ~]$ whoami quetschke [EMAIL PROTECTED] ~]$ whoami.exe whoami.exe: Command not found. [EMAIL PROTECTED] ~]$ /bin/which whoami.exe /usr/bin/whoami.exe That's by design. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin@cygwin.com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: tcsh doesn't find commands that end with .exe
Corinna Vinschen wrote: 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. [EMAIL PROTECTED] ~]$ which whoami /usr/bin/whoami [EMAIL PROTECTED] ~]$ which whoami.exe whoami.exe: Command not found. [EMAIL PROTECTED] ~]$ whoami quetschke [EMAIL PROTECTED] ~]$ whoami.exe whoami.exe: Command not found. [EMAIL PROTECTED] ~]$ /bin/which whoami.exe /usr/bin/whoami.exe 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: [EMAIL PROTECTED] ~]$ which cmd.exe /cygdrive/c/WINDOWS/system32/cmd.exe [EMAIL PROTECTED] ~]$ 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? Volker -- PGP/GPG key (ID: 0x9F8A785D) available from wwwkeys.de.pgp.net key-fingerprint 550D F17E B082 A3E9 F913 9E53 3D35 C9BA 9F8A 785D signature.asc Description: OpenPGP digital signature
Re: tcsh doesn't find commands that end with .exe
On Jun 13 12:09, Volker Quetschke wrote: Corinna Vinschen wrote: 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. [EMAIL PROTECTED] ~]$ which whoami /usr/bin/whoami [EMAIL PROTECTED] ~]$ which whoami.exe whoami.exe: Command not found. [EMAIL PROTECTED] ~]$ whoami quetschke [EMAIL PROTECTED] ~]$ whoami.exe whoami.exe: Command not found. [EMAIL PROTECTED] ~]$ /bin/which whoami.exe /usr/bin/whoami.exe 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: [EMAIL PROTECTED] ~]$ which cmd.exe /cygdrive/c/WINDOWS/system32/cmd.exe [EMAIL PROTECTED] ~]$ 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. If you need something different: http://cygwin.com/acronyms/#PTC. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin@cygwin.com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: tcsh doesn't find commands that end with .exe
Corinna Vinschen wrote: 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. Odd. The native build of tcsh on Win32 seems to support this (it hashes both with and without .exe). See http://www.tcsh.org/MostRecentRelease and http://home.blarg.net/~amol/. Does the cygwin port do something different to *not* cache .exe's? (I.e. does the internal API somehow not expose the names with .exe from cygwin mounts?) -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: tcsh doesn't find commands that end with .exe
On Jun 13 11:35, Shankar Unni wrote: Corinna Vinschen wrote: 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. Odd. The native build of tcsh on Win32 seems to support this (it hashes both with and without .exe). See http://www.tcsh.org/MostRecentRelease and http://home.blarg.net/~amol/. The native tcsh uses different code at this point. Cygwin shares its code with the UWIN port. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin@cygwin.com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: tcsh doesn't find commands that end with .exe
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. [EMAIL PROTECTED] ~]$ which whoami /usr/bin/whoami [EMAIL PROTECTED] ~]$ 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: [EMAIL PROTECTED] ~]$ which cmd.exe /cygdrive/c/WINDOWS/system32/cmd.exe [EMAIL PROTECTED] ~]$ 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 progTAB [EMAIL PROTECTED] ~]$ prog progAprogman Aha progA, good try this. [EMAIL PROTECTED] ~]$ progA progA: Command not found. Hmmm, try proga: [EMAIL PROTECTED] ~]$ 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 signature.asc Description: OpenPGP digital signature