on master help sign in
Rename 'bat cache --init' to 'bat cache --build'
commitcff01d81fa21e7ae469b9b4b2ea21e4578870732 authorsharkdp <davidpeter@web.de> dateThu 7 Feb 2019, 22:31 (8 years ago) parent31608c9
6 files changed+17−17
README.md+2−2 assets/README.md+1−1 assets/create.sh+1−1 doc/README-ja.md+2−2 src/clap_app.rs+10−10 src/main.rs+1−1
README.md+2−2
@@ -281,7 +281,7 @@ git clone https://github.com/tellnobody1/sublime-purescript-syntax
281281Now use the following command to parse these files into a binary cache:
282282
283283```bash
284−bat cache --init
284+bat cache --build
285285```
286286
287287Finally, use `bat --list-languages` to check if the new languages are available.
@@ -305,7 +305,7 @@ cd "$(bat cache --config-dir)/themes"
305305git clone https://github.com/greggb/sublime-snazzy
306306
307307# Update the binary cache
308−bat cache --init
308+bat cache --build
309309```
310310
311311Finally, use `bat --list-themes` to check if the new themes are available.
assets/README.md+1−1
@@ -13,7 +13,7 @@ In order to add new syntaxes to `bat`, follow these steps:
1313 Sublime Text and convert it to a `.sublime-syntax` file via *Tools* -> *Developer* ->
1414 *New Syntax from XXX.tmLanguage...*. Save the new file in the `assets/syntaxes` folder.
1515
16−3. Run the `create.sh` script. It calls `bat cache --init` to parse all available
16+3. Run the `create.sh` script. It calls `bat cache --build` to parse all available
1717 `.sublime-syntax` files and serialize them to a `syntaxes.bin` file (in this folder).
1818
19194. Re-compile `bat`. At compilation time, the `syntaxes.bin` file will be stored inside the
assets/create.sh+1−1
@@ -11,6 +11,6 @@ JAVADOC_FILE="${ASSET_DIR}/syntaxes/Packages/Java/JavaDoc.sublime-syntax"
1111JAVADOC_PATCH="${ASSET_DIR}/JavaDoc.sublime-syntax.patch"
1212patch "$JAVADOC_FILE" "$JAVADOC_PATCH"
1313
14−bat cache --init --blank --source="$ASSET_DIR" --target="$ASSET_DIR"
14+bat cache --build --blank --source="$ASSET_DIR" --target="$ASSET_DIR"
1515
1616patch -R "$JAVADOC_FILE" "$JAVADOC_PATCH"
doc/README-ja.md+2−2
@@ -274,7 +274,7 @@ git clone https://github.com/tellnobody1/sublime-purescript-syntax
274274次のコマンドを使用して、これらのファイルをバイナリキャッシュに解析します:
275275
276276```bash
277−bat cache --init
277+bat cache --build
278278```
279279
280280最後に `bat --list-languages` と入力すると新しい言語が利用可能かどうかチェックします。
@@ -297,7 +297,7 @@ cd "$(bat cache --config-dir)/themes"
297297git clone https://github.com/greggb/sublime-snazzy
298298
299299# Update the binary cache
300−bat cache --init
300+bat cache --build
301301```
302302
303303最後に、 `bat --list-themes` で新しいテーマが利用可能がチェックします
src/clap_app.rs+10−10
@@ -353,13 +353,13 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
353353 SubCommand::with_name("cache")
354354 .about("Modify the syntax-definition and theme cache")
355355 .arg(
356− Arg::with_name("init")
357− .long("init")
358− .short("i")
359− .help("Initialize the syntax/theme cache.")
356+ Arg::with_name("build")
357+ .long("build")
358+ .short("b")
359+ .help("Initialize (or update) the syntax/theme cache.")
360360 .long_help(
361− "Initialize the syntax/theme cache by loading from the \
362− source directory (default: the configuration directory).",
361+ "Initialize (or update) the syntax/theme cache by loading from \
362+ the source directory (default: the configuration directory).",
363363 ),
364364 )
365365 .arg(
@@ -381,13 +381,13 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
381381 )
382382 .group(
383383 ArgGroup::with_name("cache-actions")
384− .args(&["init", "clear", "config-dir", "cache-dir"])
384+ .args(&["build", "clear", "config-dir", "cache-dir"])
385385 .required(arg_group_required),
386386 )
387387 .arg(
388388 Arg::with_name("source")
389389 .long("source")
390− .requires("init")
390+ .requires("build")
391391 .takes_value(true)
392392 .value_name("dir")
393393 .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> {
395395 .arg(
396396 Arg::with_name("target")
397397 .long("target")
398− .requires("init")
398+ .requires("build")
399399 .takes_value(true)
400400 .value_name("dir")
401401 .help(
402402 "Use a different directory to store the cached syntax and theme set.",
403403 ),
404404 )
405− .arg(Arg::with_name("blank").long("blank").requires("init").help(
405+ .arg(Arg::with_name("blank").long("blank").requires("build").help(
406406 "Create completely new syntax and theme sets \
407407 (instead of appending to the default sets).",
408408 )),
src/main.rs+1−1
@@ -86,7 +86,7 @@ mod errors {
8686use errors::*;
8787
8888fn run_cache_subcommand(matches: &clap::ArgMatches) -> Result<()> {
89− if matches.is_present("init") {
89+ if matches.is_present("build") {
9090 let source_dir = matches.value_of("source").map(Path::new);
9191 let target_dir = matches.value_of("target").map(Path::new);
9292