{"id":3,"date":"2009-09-22T11:35:49","date_gmt":"2009-09-22T16:35:49","guid":{"rendered":"http:\/\/ebixio.com\/wordpress\/?p=3"},"modified":"2019-01-23T22:27:32","modified_gmt":"2019-01-24T03:27:32","slug":"cygwin-vs-msysgit","status":"publish","type":"post","link":"http:\/\/ebixio.com\/blog\/2009\/09\/22\/cygwin-vs-msysgit\/","title":{"rendered":"Cygwin vs. Msysgit"},"content":{"rendered":"<p>Both cygwin and the msysgit shell will use the same <code lang=\"bash\">~\/.bashrc<\/code> file on start-up, but they mount the local Windows drives at different mount points. Cygwin uses <code lang=\"bash\">\/cygdrive\/c<\/code> while msysgit uses simply <code lang=\"bash\">\/c<\/code> so if you&#8217;re using <code lang=\"bash\">~\/.bashrc<\/code> to configure various settings that have to do with drive letters in your bash shell, you&#8217;ll need to distinguish between cygwin and msysgit.<\/p>\n<p>The easiest way to do this is to look for the presence of <code lang=\"bash\">\/etc\/bash.bashrc<\/code> in <code lang=\"bash\">~\/.bashrc<\/code>, since this file is typically only present in cygwin. If by any chance it&#8217;s present in both cygwin and msysgit, a variable can be set in just one of them and <code lang=\"bash\">~\/.bashrc<\/code> can be configured to source <code lang=\"bash\">\/etc\/bash.bashrc<\/code> and test for the presence of that variable.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nif &#x5B; -e \/etc\/bash.bashrc ] ; then\n# Cygwin specific settings\nexport CYGWIN=1\n\n# Msysgit's grep doesn't recognize --color\nalias grep='grep --color'\nalias vi='\/cygdrive\/c\/Program\\ Files\/Vim\/vim72\/gvim.exe'\nelse\n# Msysgit specific settings\nexport CYGWIN=0\n\nalias vi='\/c\/Program\\ Files\/Vim\/vim72\/gvim.exe'\nfi\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Both cygwin and the msysgit shell will use the same ~\/.bashrc file on start-up, but they mount the local Windows drives at different mount points. Cygwin uses \/cygdrive\/c while msysgit uses simply \/c so if you&#8217;re using ~\/.bashrc to configure various settings that have to do with drive letters in your bash shell, you&#8217;ll need [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[5,6,4,7,8],"class_list":["post-3","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-bash","tag-cygwin","tag-git","tag-msysgit","tag-windows"],"_links":{"self":[{"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/posts\/3","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/comments?post=3"}],"version-history":[{"count":16,"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/posts\/3\/revisions"}],"predecessor-version":[{"id":711,"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/posts\/3\/revisions\/711"}],"wp:attachment":[{"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/media?parent=3"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/categories?post=3"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/tags?post=3"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}