Tracker Grep 5.1
Released on the 19th of June, 2007
Originally created by Matthijs Hollemans.
Currently maintained by Jonas Sundström.
Contributed to by Peter Hinely, Serge Fantino, Hideki Naito, Oscar Lesta, Oliver Tappe, Luc Schrijvers and momoziro.
What is it
Tracker Grep is a simple Tracker add-on that lets you search through text files. BeOS already comes with a tool that lets you do that, grep, but you need to use it from a Terminal window. Gone are those days of command-line trouble, because from now on Tracker Grep lets you run grep directly from the Tracker.
How to install it
Drag the Tracker Grep-G
file on the Drop Tracker Grep-G here to install
icon. That's it!
How to get rid of it
Go into the /boot/home/config/add-ons/Tracker/
directory and delete the file Tracker Grep-G
.
How to use it
Tracker Grep is no more than a graphical front-end to the grep tool that comes with BeOS. In the past you needed to know how grep worked in order to use Tracker Grep. As of version 3.0 this is no longer the case, although grep addicts are still catered for.
Select the files that you want to examine. Then right-click on one of the files or open Tracker's File
menu. Go to Add-Ons
and choose Tracker Grep
. Alternatively you can press the keys Right Ctrl-Alt-G
(PC keyboard) or Command-Control-G
(Macintosh keyboard). If you don't select any files at all, Tracker Grep will look at all the files in the current directory.
In addition to that, you can tell Tracker Grep to look into sub-directories and follow symbolic links as well. But if you do, then be aware that some of your links may be circular (they indirectly point at each other) which causes the search to loop forever if you don't cancel it at some point.
Because grep was meant to examine text files, Tracker Grep will only work on files that have the MIME supertype text
or message
. Normally this is true for all your text files, HTML files, e-mail messages, source code files, and so on. If a file has another MIME type (or none at all), it will be ignored. In the odd case that you also want to search non-text files, deselect the Text files only
option.
During the search, the Tracker Grep window displays the names of the files whose contents match the search pattern. You can click on the little arrow to the left of a file's name to either view or hide its matching lines. The Show Lines
check box tells Tracker Grep to automatically expand or collapse the matching lines of all files.
And last, but not least, you can open a file by double-clicking its name or one of its matching lines.
For advanced users of grep
By default, Tracker Grep escapes the search text before passing it on to grep. If you want to use grep's full power, turn off the Escape search text
item in the Options
menu. If this option is disabled, the search pattern is literally transferred to grep. This also allows you to pass any other command line options to grep, simply by typing them in the search text input field. Remember that grep runs inside the shell, so you still may have to escape characters that have a special meaning to the shell, most notably the backslash.
WARNING! With the Escape search text
option turned off, entering certain search patterns may produce unexpected results. A search pattern like /*
appears to hang the machine. Tracker Grep (and the system in general) becomes unresponsive, because the grepper thread is working like crazy. The same thing happens when you enter grep /* filename
in the Terminal (you probably should have typed \\/*
).
Legal stuff
This version of Tracker Grep is open source and may be distributed under the terms of the MIT license.
Copyright (c) 1998-2006 Matthijs Hollemans
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
History
Version 5.1 (19 June 2007)
- Zeta localization. Dutch translation included.
- Japanese encoding support added.
Version 5.0 (21 March 2007)
- You can select multiple items in the list view.
- You can trim away non-selected search hits, to expedite further searching.
- You can have Tracker Grep show your selected search hits in Tracker.
- It's now possible to copy a selection of search hits as text.
- A menu bar has been added.
- Lots of keyboard shortcuts added.
- Tracker Grep is now a stand-alone application as well as a Tracker add-on.
- Running Tracker Grep as an application will open an empty, untargetted window.
- Windows can be retargetted to search some other folder or set of files.
- Windows additionally accept file drops, to set search target.
- Multiple windows can be open at the same time, and tile as necessary.
- Invoking Tracker Grep as Tracker add-on will open a new window.
- The application will accept search targets as command-line arguments, when invoked from Terminal. Odd case. Mostly good for testing.
- Two settings files reduced to a single one. Your history is now history.
Version 4.3 (17 January 2006)
- Corrected version in window title and About-dialog.
- If Tracker Grep is being invoked with exactly one directory selected (like you do if you right-click a folder on the desktop), it will recurse into that directory even if the 'look in sub-directories'-setting is disabled. This has been suggested by Oscar Lesta.
- Applied Oscar Lesta's patch that causes Tracker Grep to check if opening a file in Pe actually succeeded and if that isn't the case, opens the file with its default app instead. Thanks, Oscar!
- Applied Oscar Lesta's patch which changes the behaviour of Tracker Grep for the case that you have checked 'Open with Pe': If you click on the line containing the file name (the superitem), Tracker Grep will invoke the default application (aka: view the file), the file will only be opened in Pe if you click on one of the result lines (aka: edit the file). Thanks again, Oscar!
- Before invoking grep, Tracker Grep now makes sure to escape dollars and backslashes contained in the filename, too (not only quotes).
Version 4.2 (15 January 2006)
- Tracker Grep now has a new maintainer, as Matthijs is not using BeOS anymore. If you have any questions and/or patches, please contact Oliver Tappe.
- In case you are asking Tracker Grep to recurse into sub-directories, you can now request it to ignore any directories that start with a dot. This can be quite useful if you apply Tracker Grep on a svn repository (as svn keeps its own files in directories named '.svn').
Version 4.1 (24 February 2004)
- Thanks to Oscar Lesta (BiPolar), Tracker Grep now has an "Open files in Pe" option. If this is enabled, double-clicking on a line from the search results will open the file in Pe, at the correct line number. Thanks Oscar, for this handy feature!
Version 4.0a (9 July 2003)
- The meaning of the "Case sensitive" option was reversed. Whoops.
Version 4.0 (13 February 2003)
- Cleaned up the source code.
- The search history now removes duplicate items.
- Renamed the "Do not escape search text" option to "Escape search text".
- Added "Text files only" option. If you deselect it, Tracker Grep will also look into binary files.
- The window title is now prefixed by "Tracker Grep", which makes it easier to find open Tracker Grep windows from the Deskbar.
Version 3.2 (25 November 2000)
- Now the Tracker Grep window is named after what directory the user is searching in.
- Reversed the order of the items in the history pop-up menu. It now shows the things you last searched for at the top, since that makes more sense.
Version 3.1 (11 October 2000)
- When replacing non-printable characters, Tracker Grep was a little bit too enthousiastic and wiped out characters from non-Latin languages (such as Japanese) as well. Thanks to Hideki Naito for finding - and fixing - this bug.
Version 3.0 (24 September 2000)
- Cleaned up the source code.
- There is no more PowerPC version.
- The "Show contents" check box is not disabled any more during a search, so you can toggle it on-the-fly.
- Moved the other options into a separate "Options" menu.
- Added an option for case sensitive searches.
- By default, Tracker Grep now escapes special characters in the search text before it is sent to grep. For advanced users of grep, there is a "Do not escape search text" option.
- Tracker Grep now keeps a history of the last twenty-or-so search patterns.
- Non-printable characters (such as linefeeds) are removed from the search results.
- Tracker Grep no longer crashes when grep is given an invalid search pattern, taking the Tracker with it.
Version 2.2.0 (23 January 1999)
- Changes by Serge Fantino include:
- Now you can run multiple copies of Tracker Grep at the same time without crashing the machine :-)
- Only the files whose contents match the search pattern are displayed.
- The results are now displayed in an outline list.
- Double-clicking the name of a matching file opens that file.
- Added the "Show Contents" option.
- The window shows the name of the file that is being searched.
- Tracker Grep remembers its most recent settings.
Version 2.1.1 (12 January 1999)
- Ported to BeOS Intel R4. The PowerPC version is unchanged.
Version 2.1.0 (24 August 1998)
- Changes by Peter Hinely include:
- Ported to ppc.
- Changed grep options to "grep -hin".
- Improved display of matches.
Version 2.0.0 (31 July 1998)
- This is a total rewrite (hence the major version number bump).
- The user interface has been improved (and is more responsive).
- Added a button to start and cancel the search.
- The results display now uses a fixed-width font.
- Added an option for subdirectory crawling.
- Added an option for traversing symbolic links.
Version 1.1.0 (Not released)
- Tracker Grep now looks at all the files in the current directory if nothing is selected.
- Files may also have MIME supertype "message".
Version 1.0.0 (4 July 1998)