Making Cygwin more handy

I enjoy having Cygwin installed on Windows and often like to use the shell commands (grep, find, etc.). However, it’s inconvenient to spawn a new terminal window and slog through the often-complex Windows directory structure. Based off of some websites I found, I now have a way to make this work…

Create a batch script file in your Cygwin /bin folder (for me, this is C:\Cygwin\bin) with the following:

@cd /d %1
@bash --rcfile BASCHRC -i

Create a file called “bashcontext.reg” and save the following text into it:

@="Open Bash shell here"
@="C:\\Cygwin\\bin\\runBash.bat \"%1\""
@="Open Bash shell here"
@="C:\\Cygwin\\bin\\runBash.bat \"%1\""
@="Open Bash shell here"
@="C:\\Cygwin\\bin\\runBash.bat \"%1\""

You can add the registry information by double-clicking the file to run it.

Now on every directory you have a “Open Bash shell here” option that will take you there immediately. Handy!

Here’s a screenshot showing my cluttered context menu:


, , , , ,

  1. #1 by Vater on November 28, 2007 - 6:50 pm

    Do, carodd Duw y byd gymaint nes iddo roi ei unig Fab, er mwyn i bob un sy’n credu ynddo ef beidio â mynd i ddistryw ond cael bywyd tragwyddol.

(will not be published)