mirror of
https://github.com/sharkdp/bat.git
synced 2026-02-08 00:32:08 +00:00
feat: add --quiet-empty CLI flag
This commit is contained in:
@@ -643,6 +643,18 @@ pub fn build_app(interactive_output: bool) -> Command {
|
|||||||
.hide_short_help(true)
|
.hide_short_help(true)
|
||||||
.help("Show diagnostic information for bug reports."),
|
.help("Show diagnostic information for bug reports."),
|
||||||
)
|
)
|
||||||
|
.arg(
|
||||||
|
Arg::new("quiet-empty")
|
||||||
|
.long("quiet-empty")
|
||||||
|
.short('E')
|
||||||
|
.action(ArgAction::SetTrue)
|
||||||
|
.help("Produce no output when the input is empty.")
|
||||||
|
.long_help(
|
||||||
|
"When this flag is set, bat will produce no output at all when \
|
||||||
|
the input is empty. This is useful when piping commands that may \
|
||||||
|
produce empty output, like 'git diff'.",
|
||||||
|
),
|
||||||
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("acknowledgements")
|
Arg::new("acknowledgements")
|
||||||
.long("acknowledgements")
|
.long("acknowledgements")
|
||||||
|
|||||||
Reference in New Issue
Block a user