You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Custom_Command_Keybindings.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,10 +57,9 @@ For a given custom command, here are the allowed fields:
57
57
| prompts | A list of prompts that will request user input before running the final command | no |
58
58
| loadingText | Text to display while waiting for command to finish | no |
59
59
| description | Label for the custom command when displayed in the keybindings menu | no |
60
-
| stream | Whether you want to stream the command's output to the Command Log panel | no |
61
-
| pty | Whether you want to run the command in a pseudo terminal (pty). This can be useful for commands that produce colored output when the output is a terminal. Only used when `stream` is also true. Use with care: some commands may expect the terminal to have capabilities that lazygit's pty doesn't. | no |
62
-
| showOutput | Whether you want to show the command's output in a popup within Lazygit | no |
63
-
| outputTitle | The title to display in the popup panel if showOutput is true. If left unset, the command will be used as the title. | no |
60
+
| output | Where the output of the command should go. 'none' discards it, 'log' shows it in the command log, and 'popup' shows it in a popup. | no |
61
+
| pty | Whether you want to run the command in a pseudo terminal (pty). This can be useful for commands that produce colored output when the output is a terminal. Only used when ouput is set to 'log', and subprocess is false. Use with care: some commands may expect the terminal to have capabilities that lazygit's pty doesn't. | no |
62
+
| outputTitle | 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. | no |
64
63
| after | Actions to take after the command has completed | no |
65
64
66
65
Here are the options for the `after` key:
@@ -366,7 +365,7 @@ If you use the commandMenu property, none of the other properties except key and
366
365
367
366
## Debugging
368
367
369
-
If you want to verify that your command actually does what you expect, you can wrap it in an 'echo' call and set `showOutput: true` so that it doesn't actually execute the command but you can see how the placeholders were resolved.
368
+
If you want to verify that your command actually does what you expect, you can wrap it in an 'echo' call and set `output: popup` so that it doesn't actually execute the command but you can see how the placeholders were resolved.
returnfmt.Errorf("Error with custom command%s: it is not allowed to use both commandMenu and any of the other fields except key and description.", commandRef)
Copy file name to clipboardExpand all lines: schema/config.json
+10-9Lines changed: 10 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -118,21 +118,22 @@
118
118
"type": "string",
119
119
"description": "Label for the custom command when displayed in the keybindings menu"
120
120
},
121
-
"stream": {
122
-
"type": "boolean",
123
-
"description": "If true, stream the command's output to the Command Log panel"
124
-
},
125
-
"showOutput": {
126
-
"type": "boolean",
127
-
"description": "If true, show the command's output in a popup within Lazygit"
121
+
"output": {
122
+
"type": "string",
123
+
"enum": [
124
+
"none",
125
+
"log",
126
+
"popup"
127
+
],
128
+
"description": "Where the output of the command should go. 'none' discards it, 'log' shows it in the command log, and 'popup' shows it in a popup."
128
129
},
129
130
"pty": {
130
131
"type": "boolean",
131
-
"description": "If true, run the command in a pseudo-terminal (pty). This can be useful for commands that produce colored output when the output is a terminal.\nOnly used when stream is also true.\nUse with care: some commands may expect the terminal to have capabilities that lazygit's pty doesn't."
132
+
"description": "If true, run the command in a pseudo-terminal (pty). This can be useful for commands that produce colored output when the output is a terminal.\nOnly used when ouput is set to 'log', and subprocess is false.\nUse with care: some commands may expect the terminal to have capabilities that lazygit's pty doesn't."
132
133
},
133
134
"outputTitle": {
134
135
"type": "string",
135
-
"description": "The title to display in the popup panel if showOutput is true. If left unset, the command will be used as the title."
136
+
"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."
0 commit comments