From: Manu B <ma...@us...> - 2002-11-02 14:15:32
|
Earnie Boyd wrote: > Manu B wrote: > > I'm desperately trying to find an equivalent of > > "%COMSPEC% /K cmdline" with Bash. > > With command.com/cmd.exe, the /K switch > > executes 'cmdline' and remains. > > I've RTFM and just found the '-c' switch. > > eg: > > $ sh --login -i -c 'rm -f toto' > > > > With '-c', Bash executes 'rm -f toto' and terminates. > > IOW, '-c' equals to the '/C' switch of command.com/ > > cmd.exe. > > > > How could I make Bash to execute a command line > > and stay open. > > > > Not that I'm aware of. What are you trying to accomplish? Why do you > need the subprocess shell to remain open? Could you put the commands in > the startup ~/.profile file? Well, I'd prefer to keep my intentions secret until I succeed... never mind. Do you know "DOS Prompt Here" from IE 4 power toys? It's an .inf script which add the following key into the registry: REGEDIT4 [HKEY_CLASSES_ROOT\Drive\shell\DosHere\command] @="C:\\WINDOWS\\command.com /k cd \"%1\"" Then, when you right-click on a folder or drive in Windows Explorer, and click the "DOS Prompt Here" sub-menu, "command /k cd \"%1\"" opens a brand new DOS box and 'cd' to the directory pointed by %1. Nice isn't it? Now, when you are used to that "DOS Here" menu, it's natural to think to a "MSYS here" menu in Windows Explorer :) Using MSYS as a build environment is great, it would be wonderful to use the MSYS Bash shell instead of our (stupid) DOS boxes. d:] Manu. |