Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
* New `subject(pattern)` revset function that matches first line of commit
descriptions.

* Conditional configuration now supports `--when.command` to change configuration
* Conditional configuration now supports `--when.commands` to change configuration
based on subcommand.

### Fixed bugs
Expand Down
8 changes: 4 additions & 4 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -1458,12 +1458,12 @@ Condition keys:
workspace`.


* `--when.command`: List of subcommands to match.
* `--when.commands`: List of subcommands to match.

Subcommands are space-separated and matched by prefix.

```toml
--when.command = ["file"] # matches `jj file show`, `jj file list`, etc
--when.command = ["file show"] # matches `jj file show` but *NOT* `jj file list`
--when.command = ["file", "log"] # matches `jj file` *OR* `jj log` (or subcommand of either)
--when.commands = ["file"] # matches `jj file show`, `jj file list`, etc
--when.commands = ["file show"] # matches `jj file show` but *NOT* `jj file list`
--when.commands = ["file", "log"] # matches `jj file` *OR* `jj log` (or subcommand of either)
```