summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsharkdp <davidpeter@web.de>2019-02-07 22:31:37 +0100
committerDavid Peter <sharkdp@users.noreply.github.com>2019-02-07 23:27:53 +0100
commitcff01d81fa21e7ae469b9b4b2ea21e4578870732 (patch)
treede89f38399455731f493a1c889e093c4ee28eb1c
parent31608c9a031fc1b2cec70595c6fa0026bf77ca4e (diff)
Rename 'bat cache --init' to 'bat cache --build'
-rw-r--r--README.md4
-rw-r--r--assets/README.md2
-rwxr-xr-xassets/create.sh2
-rw-r--r--doc/README-ja.md4
-rw-r--r--src/clap_app.rs20
-rw-r--r--src/main.rs2
6 files changed, 17 insertions, 17 deletions
diff --git a/README.md b/README.md
index 2e2488d7..cd09a0c4 100644
--- a/README.md
+++ b/README.md
@@ -281,7 +281,7 @@ git clone https://github.com/tellnobody1/sublime-purescript-syntax
Now use the following command to parse these files into a binary cache:
```bash
-bat cache --init
+bat cache --build
```
Finally, use `bat --list-languages` to check if the new languages are available.
@@ -305,7 +305,7 @@ cd "$(bat cache --config-dir)/themes"
git clone https://github.com/greggb/sublime-snazzy
# Update the binary cache
-bat cache --init
+bat cache --build
```
Finally, use `bat --list-themes` to check if the new themes are available.
diff --git a/assets/README.md b/assets/README.md
index 333f6466..00c29944 100644
--- a/assets/README.md
+++ b/assets/README.md
@@ -13,7 +13,7 @@ In order to add new syntaxes to `bat`, follow these steps:
Sublime Text and convert it to a `.sublime-syntax` file via *Tools* -> *Developer* ->
*New Syntax from XXX.tmLanguage...*. Save the new file in the `assets/syntaxes` folder.
-3. Run the `create.sh` script. It calls `bat cache --init` to parse all available
+3. Run the `create.sh` script. It calls `bat cache --build` to parse all available
`.sublime-syntax` files and serialize them to a `syntaxes.bin` file (in this folder).
4. Re-compile `bat`. At compilation time, the `syntaxes.bin` file will be stored inside the
diff --git a/assets/create.sh b/assets/create.sh
index f2cacd67..39656183 100755
--- a/assets/create.sh
+++ b/assets/create.sh
@@ -11,6 +11,6 @@ JAVADOC_FILE="${ASSET_DIR}/syntaxes/Packages/Java/JavaDoc.sublime-syntax"
JAVADOC_PATCH="${ASSET_DIR}/JavaDoc.sublime-syntax.patch"
patch "$JAVADOC_FILE" "$JAVADOC_PATCH"
-bat cache --init --blank --source="$ASSET_DIR" --target="$ASSET_DIR"
+bat cache --build --blank --source="$ASSET_DIR" --target="$ASSET_DIR"
patch -R "$JAVADOC_FILE" "$JAVADOC_PATCH"
diff --git a/doc/README-ja.md b/doc/README-ja.md
index 03360b55..afac532b 100644
--- a/doc/README-ja.md
+++ b/doc/README-ja.md
@@ -274,7 +274,7 @@ git clone https://github.com/tellnobody1/sublime-purescript-syntax
次のコマンドを使用して、これらのファイルをバイナリキャッシュに解析します:
```bash
-bat cache --init
+bat cache --build
```
最後に `bat --list-languages` と入力すると新しい言語が利用可能かどうかチェックします。
@@ -297,7 +297,7 @@ cd "$(bat cache --config-dir)/themes"
git clone https://github.com/greggb/sublime-snazzy
# Update the binary cache
-bat cache --init
+bat cache --build
```
最後に、 `bat --list-themes` で新しいテーマが利用可能がチェックします
diff --git a/src/clap_app.rs b/src/clap_app.rs
index 0cdba9f2..ba62747d 100644
--- a/src/clap_app.rs
+++ b/src/clap_app.rs
@@ -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).",
)),
diff --git a/src/main.rs b/src/main.rs
index 6a80c87d..98bd9b34 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -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);