Skip to content

Instantly share code, notes, and snippets.

@Hsilgos
Last active December 17, 2015 00:29
Show Gist options
  • Save Hsilgos/5521722 to your computer and use it in GitHub Desktop.
Save Hsilgos/5521722 to your computer and use it in GitHub Desktop.
Cygwin

How to open cygwin wherever you want

Add "bash.exe" to Total Commander's panel. Press right button on icon, then menu "Change..." (Изменить...). Fill field "Parameters", enter:

--login -i -c 'cd `cygpath $*`;bash' bash %P

OR

Place bat file where you want to open cygwin console and put down next script:

cygpath -u %~dp0 > tmpFile.ololo
set /p CUR_PATH=<tmpFile.ololo
del tmpFile.ololo
bash --login -i -c 'cd `cygpath $*`;bash' bash %CUR_PATH%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment