Skip to content

Commit

Permalink
config-schema: expand options for ui.editor, ui.diff.tool, and `u…
Browse files Browse the repository at this point in the history
…i.pager`

In addition to a single string, the `ui.editor` and `ui.diff.tool` options also
allow arrays of strings. `ui.pager` allows arrays of strings as well as a nested
table describing both the command and the environment.

Update config-schema.json to allow all of these types of values.

Fixes #5617
  • Loading branch information
steadmon committed Feb 12, 2025
1 parent b2e2c79 commit 69050f3
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
expand `~/` to `$HOME/`.
[#5626](https://github.com/jj-vcs/jj/pull/5626)

* `config-schema.json` now allows arrays of strings for the settings `ui.editor`
and `ui.diff.tool`.

* `config-schema.json` now allows an array of strings or nested table for the
`ui.pager` setting.

## [0.26.0] - 2025-02-05

### Release highlights
Expand Down
39 changes: 36 additions & 3 deletions cli/src/config-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@
"git"
],
"default": "diff"
},
"command-env": {
"type": "object",
"properties": {
"command": {
"type": ["array", "string"],
"items": {
"type": "string"
}
},
"env": {
"type": "object"
}
}
}
},
"properties": {
Expand Down Expand Up @@ -99,7 +113,20 @@
"default": "auto"
},
"pager": {
"type": "string",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
},
{
"$ref": "#/properties/ui/definitions/command-env"
}
],
"description": "Pager to use for displaying command output",
"default": "less -FRX"
},
Expand Down Expand Up @@ -141,7 +168,10 @@
"default": "color-words"
},
"tool": {
"type": "string",
"type": ["array", "string"],
"items": {
"type": "string"
},
"description": "External tool for generating diffs"
}
}
Expand Down Expand Up @@ -178,7 +208,10 @@
"default": true
},
"editor": {
"type": "string",
"type": ["array", "string"],
"items": {
"type": "string"
},
"description": "Editor to use for commands that involve editing text"
},
"diff-editor": {
Expand Down

0 comments on commit 69050f3

Please sign in to comment.