Skip to content

Commit

Permalink
chore: update readme to include new subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
Erin van der Veen committed Sep 16, 2024
1 parent 86b3aae commit 552b7b0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ Commands:
format Format inputs
visualise Visualise the input's Tree-sitter parse tree
config Print the current configuration
prefetch Prefetch all languages in the configuration
completion Generate shell completion script
help Print this message or the help of the given subcommand(s)
Expand Down Expand Up @@ -345,6 +346,26 @@ For example, in Bash:
source <(topiary completion)
```

#### Prefetching

Topiary dynamically downloads, builds, and loads the tree-sitter grammars. In
order to ensure offline availability or speed up startup time, the grammars can
be prefetched and compiled.

<!-- DO NOT REMOVE THE "usage" COMMENTS -->
<!-- usage:start:prefetch-->
```
Prefetch all languages in the configuration
Usage: topiary prefetch [OPTIONS]
Options:
-C, --configuration <CONFIGURATION> Configuration file [env: TOPIARY_CONFIG_FILE]
-v, --verbose... Logging verbosity (increased per occurrence)
-h, --help Print help
```
<!-- usage:end:prefetch -->

#### Logging

By default, the Topiary CLI will only output error messages. You can
Expand Down
2 changes: 1 addition & 1 deletion bin/verify-documented-usage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ diff-usage() {
}

main() {
local -a subcommands=(ROOT format visualise config completion)
local -a subcommands=(ROOT format visualise config completion prefetch)

local _diff
local _subcommand
Expand Down

0 comments on commit 552b7b0

Please sign in to comment.