Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Delivered-To: mailing list cygwin@cygwin.com Date: Tue, 14 Jun 2005 20:02:15 +0200 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: tcsh doesn't find commands that end with .exe Message-ID: <20050614180215.GU3522@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <42ADA78B.9040300@scytek.de> <20050613160117.GC3522@calimero.vinschen.de> <42ADAFC9.9090401@scytek.de> <20050613163537.GA11778@calimero.vinschen.de> <42AE20F2.4000409@scytek.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42AE20F2.4000409@scytek.de> User-Agent: Mutt/1.4.2i 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/