Neat little Cygwin / Windows interoperability hack

By | September 22, 2009

For those of you who use Cygwin to make Windows slightly more bearable…

Suppose you’re happily working in a Cygwin window, and you need to load one of the files you’re working on into a Windows app. You could select File > Open… in the app and then browse to the ten-levels-deep Cygwin folder to find the file you need, or instead you could put this in your .bashrc:

e() { explorer $(cygpath -w $(pwd)) & }

Then, in the Cygwin window, just type “e <ENTER>”, and an Explorer window will pop up, opened to the current directory. You can now double-click on the file, open it from the right-click menu, or drag and drop into a running app.

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)