Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Starts cmder+cygwin from context menu
@echo off & cd /d %0\..
set PWD=%~1
set CMDER_ROOT=C:\development\cmder
set CYGWIN_ROOT=C:\development\cygwin
set BASH_COMMAND=pushd "%CYGWIN_ROOT%" ^& "%CYGWIN_ROOT%\bin\bash" --login -i -c 'cd "`cygpath -au \"%PWD:\=/%\"`"; exec bash' ^& popd
set CONEMU_SWITCHES=-new_console:m:/mnt -new_console:a
start "Cygwin Shell" %CMDER_ROOT%\vendor\conemu-maximus5\ConEmu.exe /icon "%CYGWIN_ROOT%\bin\mintty.exe" /title Bash /loadcfgfile "%CMDER_ROOT%\config\ConEmu.xml" /cmd cmd /c "%BASH_COMMAND%" %CONEMU_SWITCHES%
@DRSDavidSoft
Copy link
Author

DRSDavidSoft commented Feb 25, 2018

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\bash_shell]
@="Open Ba&sh window here"
"Icon"="\"C:\\development\\cygwin\\bin\\mintty.exe\",0"
"Extended"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\bash_shell\command]
@="\"chp.exe\" \"C:\\development\\cmder\\cmder-bash.bat\" \"%v\""


Note: If Extended is present, Shift+Right-click. Otherwise, remove the Extended key to make it always appear.
Demo:

demo_context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment