Is it possible to set up Cygwin so that if I call Cygwin.bat from an arbitrary path using arbitrary Windows-native launching method (cmd.exe, Total Commander' command line), it will start bash prepared in that directory?
For example, if I run cmd.exe and do following (provided that Cygwin.bat is on my
C:\Users\Me>cd testdir C:\Users\Me\testdir>dir /b myfile1 myfile2 C:\Users\Me\testdir>Cygwin
Cygwin window opens and I'm just where I left off:
me@here /cygdrive/c/Users/Me/testdir $ ls myfile1* myfile2* me@here /cygdrive/c/Users/Me/testdir
As you can see, when I get Cygwin prompt, I'm already at
testdir, not at
(More typical scenario where I'm going to use this is running Cygwin from Total Commander's command line, but I guess it should work the same.)
How to achieve this?