jj/cli/tests/sample-configs/valid/ui.pager_command-env_array.toml
Jonas Greitemann 5444067c37 config-schema: schema wrongly allowed ui.pager.command to be a string
While `ui.pager` can be a string which will be tokenized on whitespace,
and argument token array, or a command/env table, the `command` key
within that table currently must be an array. The schema previously
explicitly also allowed it to be a string but that does not actually
work, as exemplified by running:
```sh
$ jj --config-file cli/tests/sample-configs/invalid/ui.pager_command-env_string.toml config list
Config error: Invalid type or value for ui.pager
Caused by: data did not match any variant of untagged enum CommandNameAndArgs
```

`CommandNameAndArgs` should potentially be changed to allow strings.
For now, the schema has been updated to reflect the status quo. A new
sample toml has been added to the `invalid` directory to cover this;
prior to updating the schema, this new test case failed. Once the
behavior is changed to allow string, the file merely needs to be moved
to `valid`.
2025-04-24 15:48:08 +00:00

4 lines
108 B
TOML

#:schema ../../../src/config-schema.json
[ui.pager]
command = ["bat", "-p"]
env = { BAT_THEME = "DarkTwo" }