Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <4.3.1.2.20020211182237.02239a80@pop.ma.ultranet.com> X-Sender: lhall AT pop DOT ma DOT ultranet DOT com X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Date: Mon, 11 Feb 2002 18:47:35 -0500 To: Peter Nann , cygwin AT cygwin DOT com From: "Larry Hall (RFK Partners, Inc)" Subject: Re: Access '.BAT' executables via $PATH without typing '.BAT'? In-Reply-To: <20020211232234.50354.qmail@web11607.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 06:22 PM 2/11/2002, Peter Nann wrote: >Is there any way to configure Cygwin so that I >can run DOS/Windows Batch files that are in my $PATH >without typing the '.bat'? > >Eg, If you have a path like $PATH=~/bin >and you have a file ~/bin/myTool.exe > >You can just type at a bash prompt: >$ myTool > >And it will run. > >However, if you have ~/bin/myTool.bat you >cannot type just 'myTool', you must instead >type 'myTool.bat'. > >Why the inconsistency? I'm sure there is a good-ish >reason, but I thought a flexible implementation >might see a setting somewhere like: >$PATH_EXT_ORDER=.exe:.bat:.pl > >Is there any way I can make the .BAT files easier >to access? > >P.S. Yes I know about aliases, symlinks, bash command-line >completion and shell-script alternatives. >- I just don't want such extra steps each time >I make a new batch file - I want it as easy as it is under >DOS/Windows command-line, which shouldn't be too much to >ask seeing as Cygwin is generally so neat that I just assume >is going to make my life easier! Another thing that makes life easier is the Cygwin email archives. Searching there can find you answers to all sorts of questions like these. It's a good place to start with any issue you have, in addition to Cygwin documentation. In this case, the answer is only in the email archives (you won't find it in other Cygwin documentation). Although I generally loathe to do so, I went and looked up the reference myself and I'm providing it below: http://sources.redhat.com/ml/cygwin/2001-01/msg00730.html While some will probably think I'm of sinister temperament for not always providing direct pointers to specifics in the email archives, I usually avoid doing so only since it serves to hone my search skills and perhaps encourages others who query this list to let theirs languish. I like everybody to have the opportunity to develop their search skills! :-) I won't ask everyone to like this personal policy of mine but at least I want to be clear to those who read this and would otherwise care to take me to task for stating my preference had I not stated the reasoning. Hope the above pointer helps, Larry Hall lhall AT rfk DOT com RFK Partners, Inc. http://www.rfk.com 838 Washington Street (508) 893-9779 - RFK Office Holliston, MA 01746 (508) 893-9889 - FAX -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/