mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-22 04:48:48 +00:00
Hide 'cache' subcommand, re-enable bold/underline styling, add note about cache subcommand
This commit is contained in:
parent
985666a390
commit
ccde13c9e8
@ -35,24 +35,6 @@ pub fn build_app(interactive_output: bool) -> Command {
|
|||||||
.max_term_width(100)
|
.max_term_width(100)
|
||||||
.about("A cat(1) clone with wings.")
|
.about("A cat(1) clone with wings.")
|
||||||
.long_about("A cat(1) clone with syntax highlighting and Git integration.")
|
.long_about("A cat(1) clone with syntax highlighting and Git integration.")
|
||||||
// Force commands to go last
|
|
||||||
.help_template(
|
|
||||||
"\
|
|
||||||
{before-help}{about-with-newline}
|
|
||||||
{usage-heading} {usage}
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
{positionals}
|
|
||||||
|
|
||||||
Options:
|
|
||||||
{options}
|
|
||||||
|
|
||||||
Commands:
|
|
||||||
{subcommands}{after-help}
|
|
||||||
",
|
|
||||||
)
|
|
||||||
// Doesn't play well with `help_template`
|
|
||||||
.disable_colored_help(true)
|
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("FILE")
|
Arg::new("FILE")
|
||||||
.help("File(s) to print / concatenate. Use '-' for standard input.")
|
.help("File(s) to print / concatenate. Use '-' for standard input.")
|
||||||
@ -548,6 +530,7 @@ Commands:
|
|||||||
} else {
|
} else {
|
||||||
app.subcommand(
|
app.subcommand(
|
||||||
Command::new("cache")
|
Command::new("cache")
|
||||||
|
.hide(true)
|
||||||
.about("Modify the syntax-definition and theme cache")
|
.about("Modify the syntax-definition and theme cache")
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("build")
|
Arg::new("build")
|
||||||
@ -606,6 +589,10 @@ Commands:
|
|||||||
.help("Build acknowledgements.bin."),
|
.help("Build acknowledgements.bin."),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
.after_long_help(
|
||||||
|
"You can use 'bat cache' to customize syntaxes and themes. \
|
||||||
|
See 'bat cache --help' for more information",
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user