From: andrewd AT axonet DOT com DOT au (Andrew Dalgleish) Subject: RE: B19; supporting a DOS-path such as C:\a\b\c;C:\d\e\f;D:\g\h 18 May 1998 12:09:18 -0700 Message-ID: <91A8FD196436D1118EC2006008186C9608C619.cygnus.gnu-win32@server1.axonet.com.au> To: gnu-win32 AT cygnus DOT com [snip] > I have (and it is still available at one or more of the big DOS > archives) > a tool set and ksh compatible shell for DOS (16 bit and 32bit with DOS > extender). The author of this shell introduced an interesting > feature, > which perhaps could be used in bash. He modified the shell to read a > special setup file that contained a list DOS command names. If I > remember > correctly, when the shell saw one of these names, it did no command > line > changes or substitutions but simply passed the whole line to cmd.com > with > the /c option. It has been a while since I used it and I do not for > sure > recall if there may have been _some_ processing of the line (for > $var's > and backticks at least) but in general if backslashes were seen they > were > left as is and if forward slashes were used in a path, they were > translated > to backslashes. > > You get the general idea, though, that the shell was changed to allow > the > co-existence of both types of commands. Maybe this could also work > for > bash > with the cygwin dll? [Andrew Dalgleish] Hmm, to be done right, the "list of dos commands" would also need to record which parameters are paths and which are just switch arguments. (eg you would not want the /i in "FIND /i text c:\foobar.txt" translated.) If you really need to drop back to the cmd/command environment, here's a workaround which doesn't require patching the shell. 1. Before starting BASH, save a copy of the current PATH in another variable (I use DOSPATH). This is so you can run DOS tools without searching the CygWin paths if you prefer. 2. Create a #!.exe which does absolutely nothing. (eg "int main() { return 0; }") 3. From within bash, you can do this: # Create a temporary batch file cat >temp.bat <