Skip to content

Instantly share code, notes, and snippets.

@DRSDavidSoft
Created February 25, 2018 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DRSDavidSoft/02e8e4f32410174b0b152fb5b776755c to your computer and use it in GitHub Desktop.
Save DRSDavidSoft/02e8e4f32410174b0b152fb5b776755c to your computer and use it in GitHub Desktop.
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

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