BareGrep on the Windoze Explorer context menu

To get BareGrep on the Windoze Explorer context menu…

Copy the following into a file called <BareGrep_Here.reg>. This assumes that <BareGrep.exe> is copied into <C:\Program Files\>.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\BareGrepHere]
@="BareGrep here"

[HKEY_CLASSES_ROOT\Directory\shell\BareGrepHere\command]
@="\"C:\\Program Files\\BareGrep.exe\" --no-regex --directory \"%1\""

[HKEY_CLASSES_ROOT\Drive\shell\BareGrepHere]
@="BareGrep here"

[HKEY_CLASSES_ROOT\Drive\shell\BareGrepHere\command]
@="\"C:\\Program Files\\BareGrep.exe\" --no-regex --directory \"%1\""

[HKEY_CLASSES_ROOT\*\shell\BareGrepHere]
@="BareGrep here (containing folder)"

[HKEY_CLASSES_ROOT\*\shell\BareGrepHere\command]
@="\"C:\\Program Files\\BareGrep.exe\" --no-regex --directory \"%1\\..\""

[HKEY_CLASSES_ROOT\*\shell\BareGrepThis]
@="BareGrep this"

[HKEY_CLASSES_ROOT\*\shell\BareGrepThis\command]
@="\"C:\\Program Files\\BareGrep.exe\" --no-regex \"%1\""

Then double-click on the file to import these setings into your registry.

Any suggestions for improvements welcome. A couple of minor glitches with these settings:

  • When BareGrep is launched from the context menu of a file via “BareGrep this”, the full path of the file appears in the Files field, even though the path to the containing directory appears in the Folder field.
  • When BareGrep is launched from the context menu of a file via “BareGrep here (containing folder)”, the un-normalised path of the directory containing the file appears in the Folder field, and the search doesn’t start until something is typed or clicked. (The path then gets normalised.)
Advertisements

One Response to “BareGrep on the Windoze Explorer context menu”

  1. sk8rx Says:

    This works well, thanks for the hack!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: