If you want to run Mintty (cygwin) from Total Commander starting it into the current work directory, then add the following lines to your .bash_profile:
if [ "$STARTDIR" != "" ]; then[ "${STARTDIR:0:1}" == '\' ] && STARTDIR="\\${STARTDIR}"cd "$(echo $STARTDIR | sed 's:\\:/:g')"fi
And in Total Commander use the following:
Command: c:\cygwin\bin\mintty.exeParameters: -e /bin/bash -c "export STARTDIR='%P' ; /bin/bash --login -i"
2 commenti:
Thanks for initial thought. I improved your version a little. You don't need any change in .bash_profile, just put this into Total Commander (Configuration -> Options -> Misc. -> Redefine hotkeys -> Choose command -> Category: usercmd.ini -> New):
Command: c:\cygwin\bin\mintty.exe
Parameters: -i /Cygwin-Terminal.ico -e /bin/bash -i -l -c "cd '%P';/bin/bash"
I use zsh instead of bash and it works in the same way:
Parameters: -i /Cygwin-Terminal.ico -e /bin/zsh -i -l -c "cd '%P';/bin/zsh"
It doesn't work when your position in Total Commander is on an UNC.
Thanks anyway, nice tip !
Posta un commento