Right now I'm using MSysGit on Windows 7, which is started from a .bat file, which itself calls bash.exe --login -i
to start a shell. At which point it executes the .bashrc file (among others) in the user's home directory. I use this script to setup the environment and cd
to a starting directory.
This all works fine. What I would like is to change the .bat file in some way so that bash will execute a custom script at startup so that in that script i could perform a different initialization and cd to a different starting directory. Then I could have two separate .bat files calling each script, then I could make a shortcut to both on the desktop and start whichever I want.
The thing that I'm not sure how to do, is get bash to run a custom init script on startup. Currently the command MSysGit uses is bash.exe --login -i
. Is there any way I can modify this to get it to use a custom file? I tried bash.exe --login --rcfile 01.txt -i
but that didn't work. Likewise nothing else I tried worked either.
Try it without --login
:
bash.exe --rcfile 01.txt -i
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With