{"id":254,"date":"2016-12-21T15:59:55","date_gmt":"2016-12-21T23:59:55","guid":{"rendered":"http:\/\/furi.us\/?p=254"},"modified":"2019-12-24T23:50:30","modified_gmt":"2019-12-25T07:50:30","slug":"cygwin-bash-in-the-context-menu","status":"publish","type":"post","link":"https:\/\/furi.us\/?p=254","title":{"rendered":"Cygwin bash in the context menu"},"content":{"rendered":"<div class=\"centerimage\"><a href=\"\/wp-content\/furius\/2016\/12\/bashmenu.png\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-255\" src=\"\/wp-content\/furius\/2016\/12\/bashmenu.png\" alt=\"Example of Windows context menu for a directory showing the bash option.\" width=\"383\" height=\"286\" srcset=\"https:\/\/furi.us\/wp-content\/furius\/2016\/12\/bashmenu.png 383w, https:\/\/furi.us\/wp-content\/furius\/2016\/12\/bashmenu-350x261.png 350w\" sizes=\"auto, (max-width: 383px) 100vw, 383px\" \/><br \/>\n<\/a><\/div>\n<p>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 <i>Windows<\/i> time, rather than <i>Cygwin<\/i> time. (Otherwise you would have to convert the directory pathname with drives and colons into Posix-ish format of \/cygdrive\/D\/&#8230;.)<\/p>\n<p>Here&#8217;s the way that works for me. Add the Windows Registry key<br \/>\n<code>HKEY_CLASSES_ROOT\\Directory\\shell\\bash\\command<\/code><br \/>\nand set the default string (REG_SZ) to the impressively unwieldy value of<br \/>\n<code>C:\\utils\\cygwin\\bin\\mintty.exe -i \/Cygwin-Terminal.ico --dir \"%V\" \/bin\/env CHERE_INVOKING=1 \/bin\/bash -l<\/code><br \/>\n(Modify the mintty pathname as required. Also, &#8211;dir is only supported on newer versions of mintty.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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\/&#8230;.) Here&#8217;s the way that works for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,1],"tags":[],"class_list":["post-254","post","type-post","status-publish","format-standard","hentry","category-computernitpicks","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/furi.us\/index.php?rest_route=\/wp\/v2\/posts\/254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/furi.us\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/furi.us\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/furi.us\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/furi.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=254"}],"version-history":[{"count":9,"href":"https:\/\/furi.us\/index.php?rest_route=\/wp\/v2\/posts\/254\/revisions"}],"predecessor-version":[{"id":317,"href":"https:\/\/furi.us\/index.php?rest_route=\/wp\/v2\/posts\/254\/revisions\/317"}],"wp:attachment":[{"href":"https:\/\/furi.us\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/furi.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/furi.us\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}