grepp - An improved version of the most common combinations of grep, find and sed/perl, in a single script.
grepp pattern [location] [-r replace_pattern [-f]] [-I] [-c] [-l] [--ignore-extension|--ie ext] [--color] [--buffer size] [--show-buffer-errors|--sbe] [--no-pager] [--debug|--trace]
grepp [-h |-?] # Short help
grepp [--help] # Extended help
command | grepp [options] 'pattern' # pipe usage
greps 'pattern' recursively from current dir or 'location' in every file except for file patterns given by the cmdline option --ignore-file
.
It is inspired in grep, but unlike grep it doesn’t print a : divider right after the file name since that makes it annoying to double click to select, it adds a space before and after the : divider.
As it is expected, the color only shows when the ouput is not being piped. See --color for more details.
It automatically pipes the output to your environment PAGER or to less -R if no environment value is set.
- 'pattern'
-
Pattern to grep for (In regex syntax).
- 'location'
-
Location to search in. By default it will use the current directory.
- -c | --case
-
Do not ignore case.
- -l
-
Print file name only.
- -I
-
Do not ignore binary files.
- TODO --name | --iname 'file_pattern'
-
filter result to match only things that match 'file_pattern'. iname does case insensitive matching.
- TODO --if | --ignore-file 'file_pattern'
-
Ignore files matching 'file_pattern' regex. Can be used more than once. Case insensitive.
- TODO --fullpath
-
Print full paths for matching files.
- TODO --spacing
-
Print original spacing. By default initial spacing is ignored.
- TODO -C 'NUM', -'NUM', --context='NUM'
-
Print 'NUM' lines of output context. Places a line containing a group separator (--) between contiguous groups of matches. With the -o or --only-matching option, this has no effect and a warning is given.
- --color 'never'|'auto'|'always'
-
Select color use: never, auto (default), always.
grep prints a colon : divider after the file name since that makes it annoying to double click to select.
TODO: images here
This file is part of grepp.
Copyright © 2012-2024 David Gamba Rios
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.