delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/02/11/18:23:15

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <20020211232234.50354.qmail@web11607.mail.yahoo.com>
Date: Tue, 12 Feb 2002 10:22:34 +1100 (EST)
From: =?iso-8859-1?q?Peter=20Nann?= <pnann AT yahoo DOT com>
Subject: Access '.BAT' executables via $PATH without typing '.BAT'?
To: cygwin AT cygwin DOT com
MIME-Version: 1.0

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!

Thanks in advance.



http://greetings.yahoo.com.au - Yahoo! Greetings
- Send your Valentines love online.

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019