When opening Cmder at current folder using the context menu, if the startup task is Git Bash, the new console will open at Home dir.
Default bash task:
cmd /c "%ConEmuDir%\..\git-for-windows\bin\bash" --login -i -new_console:d:%USERPROFILE%
Expected behavior:
Bash is open in current folder.
+1
Just add if [ -n "$CMDER_START" ]; then cd ${CMDER_START} ; fi in your bashrc.
This code check the CMDER_START env, and go to the directory cmder opened.
For example, I use git bash, so I add it at the end of C:\Program Files\Git\etc\bash.bashrc
works! thanks @relzhong :+1:
Thanks @relzhong.
Could be nice to add a documentation for that in the Readme.
This should work out of the box without fiddling with C:\Program Files\Git\etc\bash.bashrc. The shell extension is registered with "C:\cmder\Cmder.exe" "%V" and this should be honored
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contribution.
This issue has been automatically closed due to it not having any activity since it was marked as stale. Thank you for your contribution.
Most helpful comment
Just add
if [ -n "$CMDER_START" ]; then cd ${CMDER_START} ; fiin your bashrc.This code check the CMDER_START env, and go to the directory cmder opened.
For example, I use git bash, so I add it at the end of
C:\Program Files\Git\etc\bash.bashrc