App-Greple
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
[perldoc](https://metacpan.org/pod/perldoc) command.
greple -Mdig --man
perldoc App::Greple::dig
When it does not work, use `perldoc App::Greple::dig`.
- **colors**
Color variation module.
See [App::Greple::colors](https://metacpan.org/pod/App%3A%3AGreple%3A%3Acolors).
- **find**
Module to use [find(1)](http://man.he.net/man1/find) command to help recursive search.
See [App::Greple::find](https://metacpan.org/pod/App%3A%3AGreple%3A%3Afind).
- **dig**
Module for recursive search using **find** module. Defines `--dig`,
`--git` and `--git-r` options. See [App::Greple::dig](https://metacpan.org/pod/App%3A%3AGreple%3A%3Adig).
- **pgp**
Module to search **pgp** files.
See [App::Greple::pgp](https://metacpan.org/pod/App%3A%3AGreple%3A%3Apgp).
- **select**
Module to select files.
See [App::Greple::select](https://metacpan.org/pod/App%3A%3AGreple%3A%3Aselect).
- **perl**
Sample module to search from perl source files.
See [App::Greple::perl](https://metacpan.org/pod/App%3A%3AGreple%3A%3Aperl).
Other modules are available at CPAN, or git repository
[https://github.com/kaz-utashiro/](https://github.com/kaz-utashiro/).
# OPTIONS
## PATTERNS
If no positive pattern option is given (i.e. other than `--not` and
`--may`), **greple** takes the first argument as a search pattern
specified by `--le` option. All of these patterns can be specified
multiple times.
Command itself is written in Perl, and any kind of Perl style regular
expression can be used in patterns. See [perlre(1)](http://man.he.net/man1/perlre) for detail.
Note that multiple line modifier (`m`) is set when executed, so put
`(?-m)` at the beginning of regex if you want to explicitly disable
it.
Order of capture group in the pattern is not guaranteed. Please avoid
to use direct index, and use relative or named capture group instead.
For example, if you want to search repeated characters, use
`(\w)\g{-1}` or `(?<c>\w)\g{c}` rather than
`(\w)\1`.
- **-e** _pattern_, **--and**=_pattern_
Specify the positive match pattern. Next command print lines contains
all of `foo`, `bar` and `baz`.
greple -e foo -e bar -e baz
- **-t** _pattern_, **--may**=_pattern_
Specify the optional (tentative) match pattern. Next command print
lines contains `foo` and `bar`, and highlight `baz` if exists.
greple -e foo -e bar -t baz
Since it does not affect the bare pattern argument, you can add the
highlighting word to the end of the command argument as follows.
greple foo file
greple foo file -t bar
greple foo file -t bar -t baz
- **-r** _pattern_, **--must**=_pattern_
Specify the required match pattern. If one or more required pattern
exist, other positive match pattern becomes optional.
greple -r foo -r bar -e baz
Because `-t` promote all other `-e` patterns required, next command
do the same thing. Mixing `-r`, `-e` and `-t` is not recommended,
though.
greple -r foo -e bar -t baz
- **-v** _pattern_, **--not**=_pattern_
Specify the negative match pattern. Because it does not affect to the
bare pattern argument, you can narrow down the search result like
this.
greple foo file
greple foo file -v bar
greple foo file -v bar -v baz
In the above pattern options, space characters are treated specially.
They are replaced by the pattern which matches any number of white
spaces including newline. So the pattern can expand to multiple
lines. Next commands search the series of word `foo` `bar` `baz`
even if they are separated by newlines.
greple -e 'foo bar baz'
This is done by converting pattern `foo bar baz` to
`foo\s+bar\+baz`, so that word separator can match one or more white
spaces.
As for Asian wide characters, pattern is cooked as zero or more white
spaces can be allowed between any characters. So Japanese string
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.113 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )