Date: Fri, 26 Mar 1999 03:56:51 -0500 Message-Id: <199903260856.DAA22667@mescaline.gnu.org> From: Eli Zaretskii To: djgpp-workers AT delorie DOT com In-reply-to: (message from Hans-Bernhard Broeker on Thu, 25 Mar 1999 12:39:48 +0100 (MET)) Subject: Re: Bash 2.03 update (March 19th) References: Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk From: Hans-Bernhard Broeker Just as an idea: in traditional DOS (i.e. command.com), program.bat is the *last* thing that will be tried when you call 'program'. The command.com search order is doskey macro (if any) in '.', and then in each directory of the PATH: { program.com program.exe program.bat } We do the same, we just append `program' at the end of this list. So, if 'program' is a COFF binary, i.e. more like an .exe than a .bat, then it should be tried before program.bat, IMHO. If it's a Bourne sh script, I'ld still prefer trying it before the crippled .bat script. You cannot do that on LFN systems, because `program' might be actually something like `foo.bar.bat', and to further complicate matters, there might be a program in the same directory called `foo.bar.bat.exe'. I know this is a bit perverse, but a user is entitled to have that. Moreover, there could be a directory `foo' and a program `foo.exe', in which case again it is better to try `foo.exe' first. And if that is not enough, running a raw COFF executable requires go32-v2 to be present, so if it is not available, you will fail; trying the .exe first works better in this case as well. So, on balance, I think trying with the extension first is a better way.