NAME
App::Greple::frame - Greple frame output module
SYNOPSIS
greple -Mframe --style=fold -- ...
greple -Mframe --frame ...
VERSION
Version 1.04
DESCRIPTION
Greple -Mframe module provide a capability to put surrounding frames for each blocks.
top, middle and bottom frames are printed for blocks.
By default --join-blocks option is enabled to collect consecutive lines into a single block. If you don't like this, override it by --no-join-blocks option.
MODULE OPTIONS
Options placed between -Mframe and -- belong to the module, so their names do not conflict with the options of greple or of other modules.
greple -Mframe --style=cols -- pattern file
greple -Mframe --style=fold --width=80 -- pattern file
When -- is given, everything before it must be a module option, so -Mframe --frame pattern -- file is an error. Options of greple and the pattern come after it.
- --style=name
-
Select the output style. An unknown name is an error.
- fold
-
Set frame and fold long lines with frame-friendly prefix string. Folding width is taken from the terminal. Or you can specify the width with the --width option.
- cols
-
Output results in multi-column format to fit the width of the terminal. The number of columns is automatically calculated from the terminal width.
- pages
-
Output results in multi-column and paginated format.
- --width=n
-
Output width. It takes the place of the terminal width, and accepts RPN as described in "CONFIGURATION".
The next options mean the same as the options of the same name of App::ansicolumn and App::ansifold.
- --pane=n
-
Number of columns of cols and pages styles. By default, as many columns as fit in the output width with text of 80 columns.
- --pane-width=n
-
Width of a column of cols and pages styles, including the border. The number of columns is calculated from it unless --pane is given, and the columns are not widened to the output width.
--pane and --pane-width accept RPN, starting with the output width.
- --boundary=
none|word|space -
Where to fold long lines.
- --linebreak=
none|all|runin|runout -
Line-break mode.
- --runin=n, --runout=n, --runlen=n
-
Run-in and run-out width. --runlen sets both, and --runin and --runout take priority over it. cols and pages styles keep the run-in width free in the column, so the text area gets shorter.
cols and pages styles use --boundary=none, --linebreak=all and --runlen=0 by default. fold style gives them to ansifold only when they are specified.
- --config name=value,...
-
Set parameters of "CONFIGURATION".
COMMAND OPTIONS
These options work as options of the greple command, and do not need --. They are kept for compatibility and may be removed in the future. Use "MODULE OPTIONS".
- --frame
-
Same as --style=fold.
- --frame-cols
-
Same as --style=cols.
- --frame-pages
-
Same as --style=pages.
- --set-frame-width=#
-
Same as --width. You have to put this option before --frame option.
CONFIGURATION
Module parameters are set with Getopt::EX::Config by the config function. The --config module option sets the same parameters.
The set function does the same as config. It is kept only for compatibility and will be removed in the future.
- config(width=n)
-
Set terminal width to n. Use like this:
greple -Mframe::config(width=80) ... greple -Mframe::config=width=80 ...If non-digit character is found in the value part, it is considered as a Reverse Polish Notation, starting terminal width pushed on the stack. RPN
2/3-meansterminal-width / 2 - 3.You can use like this:
greple -Mframe::config=width=2/3- --frame --uc '(\w+::)+\w+' --git | ansicolumn -PC2With cols and pages styles, the whole output has this width, and the width and the number of the columns are calculated from it.
An unknown parameter is an error.
- config(style=name)
- config(pane=n), config(pane_width=n)
- config(boundary=name), config(linebreak=name)
- config(runin=n), config(runout=n), config(runlen=n)
-
Same as the module options of the same name.
SEE ALSO
AUTHOR
Kazumasa Utashiro
LICENSE
Copyright 2022-2026 Kazumasa Utashiro.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.