Skip to content

Commit cff01d8

Browse files
committed
Rename 'bat cache --init' to 'bat cache --build'
1 parent 31608c9 commit cff01d8

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ git clone https://github.com/tellnobody1/sublime-purescript-syntax
281281
Now 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

287287
Finally, use `bat --list-languages` to check if the new languages are available.
@@ -305,7 +305,7 @@ cd "$(bat cache --config-dir)/themes"
305305
git clone https://github.com/greggb/sublime-snazzy
306306
307307
# Update the binary cache
308-
bat cache --init
308+
bat cache --build
309309
```
310310

311311
Finally, use `bat --list-themes` to check if the new themes are available.

assets/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

1919
4. Re-compile `bat`. At compilation time, the `syntaxes.bin` file will be stored inside the

assets/create.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ JAVADOC_FILE="${ASSET_DIR}/syntaxes/Packages/Java/JavaDoc.sublime-syntax"
1111
JAVADOC_PATCH="${ASSET_DIR}/JavaDoc.sublime-syntax.patch"
1212
patch "$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

1616
patch -R "$JAVADOC_FILE" "$JAVADOC_PATCH"

doc/README-ja.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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"
297297
git 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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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,28 +381,28 @@ 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."),
394394
)
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ mod errors {
8686
use errors::*;
8787

8888
fn 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

0 commit comments

Comments
 (0)