1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-02 03:12:25 +01:00

Rename 'bat cache --init' to 'bat cache --build'

This commit is contained in:
sharkdp
2019-02-07 22:31:37 +01:00
committed by David Peter
parent 31608c9a03
commit cff01d81fa
6 changed files with 17 additions and 17 deletions

View File

@@ -353,13 +353,13 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
SubCommand::with_name("cache")
.about("Modify the syntax-definition and theme cache")
.arg(
Arg::with_name("init")
.long("init")
.short("i")
.help("Initialize the syntax/theme cache.")
Arg::with_name("build")
.long("build")
.short("b")
.help("Initialize (or update) the syntax/theme cache.")
.long_help(
"Initialize the syntax/theme cache by loading from the \
source directory (default: the configuration directory).",
"Initialize (or update) the syntax/theme cache by loading from \
the source directory (default: the configuration directory).",
),
)
.arg(
@@ -381,13 +381,13 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
)
.group(
ArgGroup::with_name("cache-actions")
.args(&["init", "clear", "config-dir", "cache-dir"])
.args(&["build", "clear", "config-dir", "cache-dir"])
.required(arg_group_required),
)
.arg(
Arg::with_name("source")
.long("source")
.requires("init")
.requires("build")
.takes_value(true)
.value_name("dir")
.help("Use a different directory to load syntaxes and themes from."),
@@ -395,14 +395,14 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
.arg(
Arg::with_name("target")
.long("target")
.requires("init")
.requires("build")
.takes_value(true)
.value_name("dir")
.help(
"Use a different directory to store the cached syntax and theme set.",
),
)
.arg(Arg::with_name("blank").long("blank").requires("init").help(
.arg(Arg::with_name("blank").long("blank").requires("build").help(
"Create completely new syntax and theme sets \
(instead of appending to the default sets).",
)),

View File

@@ -86,7 +86,7 @@ mod errors {
use errors::*;
fn run_cache_subcommand(matches: &clap::ArgMatches) -> Result<()> {
if matches.is_present("init") {
if matches.is_present("build") {
let source_dir = matches.value_of("source").map(Path::new);
let target_dir = matches.value_of("target").map(Path::new);