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 *