App-Greple
view release on metacpan or search on metacpan
Show module file contents. Use with `-M` option.
- **--path**
Show module file path. Use with `-M` option.
- **--norc**
Do not read startup file: `~/.greplerc`. This option has to be
placed before any other options including `-M` module options.
Setting `GREPLE_NORC` environment has the same effect.
- **--error**=_action_
As **greple** tries to read data as a character string, sometimes fails
to convert them into internal representation, and the file is skipped
without processing by default. This works fine to skip binary
data. (**skip**)
Also sometimes encounters code mapping error due to character
encoding. In this case, reading the file as a binary data helps to
produce meaningful output. (**retry**)
This option specifies the action when data read error occurred.
- **skip**
Skip the file. Default.
- **retry**
Retry reading the file as a binary data.
- **fatal**
Abort the operation.
- **ignore**
Ignore error and continue to read anyway.
You may occasionally want to find text in binary data. Next command
will work like [strings(1)](http://man.he.net/man1/strings) command.
greple -o --re '(?a)\w{4,}' --error=retry --uc /bin/*
If you want read all files as binary data, use `--icode=binary`
instead.
- **-w**, **--warn** _type_=\[`0`,`1`\]
Control runtime message mainly about file operation related to
`--error` option. Repeatable. Value is optional and 1 is assumed
when omitted. So `-wall` option is the same as `-wall=1` and enables
all messages, and `-wall=0` disables all.
Types are:
- **read**
(Default 0) Errors occurred during file read. Mainly unicode related
errors when reading binary or ambiguous text file.
- **skip**
(Default 1) File skip message.
- **retry**
(Default 0) File retry message.
- **begin**
(Default 0) When `--begin` function died with `/^SKIP/i` message,
the file is skipped without any notice. Enables this to see the dying
message.
- **all**
Set same value for all types.
- **--alert** \[ `size`=#, `time`=# \]
Set alert parameter for large file. **Greple** scans whole file
content to know line borders, and it takes several seconds or more if
it contains large number of lines.
By default, if the target file contains more than **512 \* 1024
characters** (_size_), **2 seconds** timer will start (_time_). Alert
message is shown when the timer expired.
To disable this alert, set the size as zero:
--alert size=0
- **-Mdebug**, **-d**_x_
Debug option is described in [App::Greple::debug](https://metacpan.org/pod/App%3A%3AGreple%3A%3Adebug) module.
# ENVIRONMENT and STARTUP FILE
- **GREPLEOPTS**
Environment variable GREPLEOPTS is used as a default options. They
are inserted before command line options.
- **GREPLE\_NORC**
If set non-empty string, startup file `~/.greplerc` is not processed.
- **DEBUG\_GETOPT**
Enable [Getopt::Long](https://metacpan.org/pod/Getopt%3A%3ALong) debug option.
- **DEBUG\_GETOPTEX**
Enable [Getopt::EX](https://metacpan.org/pod/Getopt%3A%3AEX) debug option.
- **NO\_COLOR**
If true, all coloring capability with ANSI terminal sequence is
( run in 0.518 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )