Combine customCommand's subprocess, stream, and showOutput fields into a single output enum

This commit is contained in:
Stefan Haller 2025-04-30 17:13:33 +02:00
parent 5f4be3bfb7
commit a9f9dee30d
9 changed files with 187 additions and 43 deletions

View file

@ -96,10 +96,6 @@
"git fetch {{.Form.Remote}} {{.Form.Branch}} \u0026\u0026 git checkout FETCH_HEAD"
]
},
"subprocess": {
"type": "boolean",
"description": "If true, run the command in a subprocess (e.g. if the command requires user input)"
},
"prompts": {
"items": {
"$ref": "#/$defs/CustomCommandPrompt"
@ -118,17 +114,20 @@
"type": "string",
"description": "Label for the custom command when displayed in the keybindings menu"
},
"stream": {
"type": "boolean",
"description": "If true, stream the command's output to the Command Log panel"
},
"showOutput": {
"type": "boolean",
"description": "If true, show the command's output in a popup within Lazygit"
"output": {
"type": "string",
"enum": [
"none",
"terminal",
"log",
"logWithPty",
"popup"
],
"description": "Where the output of the command should go. 'none' discards it, 'terminal' suspends lazygit and runs the command in the terminal (useful for commands that require user input), 'log' streams it to the command log, 'logWithPty' is like 'log' but runs the command in a pseudo terminal (can be useful for commands that produce colored output when the output is a terminal), and 'popup' shows it in a popup."
},
"outputTitle": {
"type": "string",
"description": "The title to display in the popup panel if showOutput is true. If left unset, the command will be used as the title."
"description": "The title to display in the popup panel if output is set to 'popup'. If left unset, the command will be used as the title."
},
"after": {
"$ref": "#/$defs/CustomCommandAfterHook",