Changed non-tty output to BARE instead of PLAIN
This commit is contained in:
parent
900466c483
commit
58fef531eb
4
bp.1
4
bp.1
@ -1,4 +1,4 @@
|
||||
.\" Automatically generated by Pandoc 2.14.0.2
|
||||
.\" Automatically generated by Pandoc 2.14.2
|
||||
.\"
|
||||
.TH "BP" "1" "May 17 2021" "" ""
|
||||
.hy
|
||||
@ -81,7 +81,7 @@ Set the output format.
|
||||
line numbers with no coloring, \f[I]bare\f[R] prints only the match
|
||||
text, \f[I]file:line\f[R] prints the filename and line number for each
|
||||
match (grep-style), and \f[I]auto\f[R] (the default) uses
|
||||
\f[I]fancy\f[R] formatting when the output is a TTY and \f[I]plain\f[R]
|
||||
\f[I]fancy\f[R] formatting when the output is a TTY and \f[I]bare\f[R]
|
||||
formatting otherwise.
|
||||
.TP
|
||||
\f[B]-h\f[R], \f[B]--help\f[R]
|
||||
|
2
bp.1.md
2
bp.1.md
@ -77,7 +77,7 @@ all text before and after each match.
|
||||
prints line numbers with no coloring, *bare* prints only the match text,
|
||||
*file:line* prints the filename and line number for each match (grep-style),
|
||||
and *auto* (the default) uses *fancy* formatting when the output is a TTY and
|
||||
*plain* formatting otherwise.
|
||||
*bare* formatting otherwise.
|
||||
|
||||
`-h`, `--help`
|
||||
: Print the usage and exit.
|
||||
|
2
bp.c
2
bp.c
@ -521,7 +521,7 @@ int main(int argc, char *argv[])
|
||||
if (options.context_after == USE_DEFAULT_CONTEXT) options.context_after = 0;
|
||||
|
||||
if (options.format == FORMAT_AUTO)
|
||||
options.format = isatty(STDOUT_FILENO) ? FORMAT_FANCY : FORMAT_PLAIN;
|
||||
options.format = isatty(STDOUT_FILENO) ? FORMAT_FANCY : FORMAT_BARE;
|
||||
|
||||
// If any of these signals triggers, and there is a temporary file in use,
|
||||
// be sure to clean it up before exiting.
|
||||
|
Loading…
Reference in New Issue
Block a user