Cygwin bash in the context menu

Getting the Cygwin bash (mintty) in the Windows context menu is a little esoteric. Mostly this is because you have to set the directory at Windows time, rather than Cygwin time. (Otherwise you would have to convert the directory pathname with drives and colons into Posix-ish format of /cygdrive/D/….)

Here’s the way that works for me. Add the Windows Registry key
HKEY_CLASSES_ROOT\Directory\shell\bash\command
and set the default string (REG_SZ) to the impressively unwieldy value of
C:\utils\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico --dir "%V" /bin/env CHERE_INVOKING=1 /bin/bash -l
(Modify the mintty pathname as required. Also, –dir is only supported on newer versions of mintty.)

0 Responses to “Cygwin bash in the context menu”


  1. No Comments

Leave a Reply