Back in the mid-eighties, a company called Microlytics released a product called GOFER for MS-DOS. Gofer was a file search tool that would rapidly search a directory tree for files containing a match to an expression containing eight search terms, each of which was a literal string, and each of which could be combined with the others using "or" and "near". So you could say "find files matching "a" or "b" or "c" or " d " within 10 lines of "e" or "f g" or "h i j" or "k", for example. Unfortunately, Microlytics went out of business and never released a version of GOFER for Windows or Linux.
There are a lot of search tools available nowadays, but they're mostly extremely complicated, like xapian, or line-oriented, like grep. Line oriented search tools are virtually useless for searching text, and tools like xapian are just too hard to get working for regular folks.
So this project is intended to be a functional replacement for GOFER. Since the trademark has been let lapse, I'm using the same name so that old GOFER aficianados will be able to find this, but if the original authors are bugged by this, please contact me and I will pick a new name - this is intended as a tribute, not as claim jumping! GOFER is still in active use by the Asian Classics Input project; the reason for writing this new version is that a version of GOFER running in DOS is very hard to use on a Linux or Mac system, and it would be really nice to be able to cut and paste out of a GOFER window.
Right now I've gotten most of the code written for a command line version of the software. No regexp support yet, because that's not really what GOFER did, but I will be adding that. I've written a Qt 4.1-based GUI, which works pretty well now, and my main focus at this point is on enhancing performance and reliability. I'd be curious to see comments on the GUI.
The idea with the GUI is that first you set up the search. There are two sets of four search string input boxes; the search will match any of the strings in either set of boxes, and then combine the match in one of a variety of ways. So you can search for one of four of synonyms within a certain distance of one of four other synonyms - the distance can be in lines or characters.
You can save a search as well, so that for example if you frequently search a given tree, you might want to save that tree for later; if you save many different search trees, then you can trigger searches in any tree pretty easily. You can also use this feature to keep a record of searches that you've used to find information while compiling a research paper, for example.
Once you've triggered a search, you automatically see the results in a
different tab. I used tabs because I think it's convenient to have the
entire state of the search in one window, and be able to switch back and
forth between the search settings and the search results. I'm curious if
anyone else finds this mechanism useful.
Briefly, to use the command line, type "gofer dir1 ... dirN", where dir1 through dirN are names of directories to search, and you don't type "..." on the command line. You will get a prompt, "> ". At the prompt, you type in a search expression. WHen you are done with your expression, type "end" on a line by itself.
The expression can be a simple string, "look for me!!!", or a combination - usually "look for me" or "look for the other me". You can group with parentheses. You can search for a string nearby another string: "look for me" within 3 lines of "and you will find me."