Epsilon User's Manual and Reference >
Command Reference >
grep
Search multiple files for a pattern. | Alt-F7 |
This command lets you search a set of files for a pattern. It prompts
for the search string and the file pattern. Then it scans the files,
accumulating matching lines in the grep buffer. The grep buffer
appears in the current window. By default, the grep command
interprets the search string as a regular expression. Press Ctrl-T at
the search string prompt to toggle regular expression mode. You can
also type Ctrl-W or Ctrl-C to toggle word-mode or case-folding
searches, respectively.
At the file pattern prompt, you can press <Enter> if you want Epsilon
to search the same set of files as before. Type Ctrl-S and Epsilon
will type in the directory part of the current buffer's file name;
this is convenient when you want to search other files in the same
directory as the current file. As at other prompts, you can also
press Alt-<Up> key or Alt-Ctrl-P to show a list of your previous
responses to the prompt. Use the arrow keys or the mouse to choose a
previous response to repeat, and press <Enter>. If you want to edit
the response first, press Alt-E.
You can use extended file patterns to search in multiple directories
using a pattern like **\*.{c,cpp,h} (which searches in the current
directory tree for .c, .cpp, and .h files). Epsilon skips over any
file with an extension listed in grep-ignore-file-extensions; by
default some binary file types are excluded.
With a numeric argument, grep instead searches through all
buffers. The buffer name pattern may contain the wildcard characters
? to match any single character, * to match zero or more
characters, or a character class like [^a-zA-Z] to match any
non-alphabetic character.
In grep mode, alphabetic keys run special grep commands. See the
description of the grep-mode command for details. Typing H or "?"
in grep mode gives help on grep subcommands.
More info:
Searching Multiple Files
grep-show-absolute-path
Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.
|