jj/cli
Bryce Berger cbb743cfb5 config: add --when.command to scope resolution
Closes #5217

Motivating use case:

    [[--scope]]
    --when.command = ["log"]
    [--scope.ui]
    pager = "less"

This adds a new (optional) field to `--when` config conditions, to
inspect the current command.

`--when.commands` is a list of space-separated values that matches a
space-separated command. To be specific:

    --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 both `--when.commands` and `--when.repositories` are set, the
intersection is used.
2025-01-24 05:30:07 +00:00
..
examples
src config: add --when.command to scope resolution 2025-01-24 05:30:07 +00:00
testing
tests config: add --when.command to scope resolution 2025-01-24 05:30:07 +00:00
build.rs
Cargo.toml
docs
LICENSE