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/terminal/shell-integration.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -233,11 +233,11 @@ VS Code has a set of custom escape sequences designed to enable the shell integr
233
233
234
234
These sequences should be ignored by other terminals, but unless other terminals end up adopting the sequences more widely, it's recommended to check that `$TERM_PROGRAM` is `vscode` before writing them.
235
235
236
-
-`OSC 633 ; A ST` - Mark prompt start.
237
-
-`OSC 633 ; B ST` - Mark prompt end.
238
-
-`OSC 633 ; C ST` - Mark pre-execution.
239
-
-`OSC 633 ; D [; <exitcode>] ST` - Mark execution finished with an optional exit code.
240
-
-`OSC 633 ; E ; <commandline> [; <nonce] ST` - Explicitly set the command line with an optional nonce.
236
+
-`OSC 633 ; A ST`: Mark prompt start.
237
+
-`OSC 633 ; B ST`: Mark prompt end.
238
+
-`OSC 633 ; C ST`: Mark pre-execution.
239
+
-`OSC 633 ; D [; <exitcode>] ST`: Mark execution finished with an optional exit code.
240
+
-`OSC 633 ; E ; <commandline> [; <nonce] ST`: Explicitly set the command line with an optional nonce.
241
241
242
242
The E sequence allows the terminal to reliably get the exact command line interpreted by the shell. When this is not specified, the terminal may fallback to using the A, B and C sequences to get the command, or disable the detection all together if it's unreliable.
243
243
@@ -253,30 +253,30 @@ These sequences should be ignored by other terminals, but unless other terminals
253
253
";" -> "\x3b"
254
254
```
255
255
256
-
-`OSC 633 ; P ; <Property>=<Value> ST` - Set a property on the terminal, only known properties will be handled.
256
+
-`OSC 633 ; P ; <Property>=<Value> ST`: Set a property on the terminal, only known properties will be handled.
257
257
258
258
Known properties:
259
259
260
-
-`Cwd` - Reports the current working directory to the terminal.
261
-
-`IsWindows` - Indicates whether the terminal is using a Windows backend like winpty or conpty. This may be used to enable additional heuristics as the positioning of the shell integration sequences are not guaranteed to be correct. Valid values are `True` and `False`.
262
-
-`HasRichCommandDetection` - Indicates whether the terminal has rich command detection capabilities. This property is set to `True` when the shell integration script acts ideally as VS Code expects it, specifically sequences should come in the expected positions in the order `A, B, E, C, D`.
260
+
-`Cwd`: Reports the current working directory to the terminal.
261
+
-`IsWindows`: Indicates whether the terminal is using a Windows backend like winpty or conpty. This may be used to enable additional heuristics as the positioning of the shell integration sequences are not guaranteed to be correct. Valid values are `True` and `False`.
262
+
-`HasRichCommandDetection`: Indicates whether the terminal has rich command detection capabilities. This property is set to `True` when the shell integration script acts ideally as VS Code expects it, specifically sequences should come in the expected positions in the order `A, B, E, C, D`.
263
263
264
264
265
265
### Final Term shell integration
266
266
267
267
VS Code supports Final Term's shell integration sequences, which allow non-VS Code shell integration scripts to work in VS Code. This results in a somewhat degraded experience as it doesn't support as many features as `OSC 633`. Here are the specific sequences that are supported:
268
268
269
-
-`OSC 133 ; A ST` - Mark prompt start.
270
-
-`OSC 133 ; B ST` - Mark prompt end.
271
-
-`OSC 133 ; C ST` - Mark pre-execution.
272
-
-`OSC 133 ; D [; <exitcode>] ST` - Mark execution finished with an optional exit code.
269
+
-`OSC 133 ; A ST`: Mark prompt start.
270
+
-`OSC 133 ; B ST`: Mark prompt end.
271
+
-`OSC 133 ; C ST`: Mark pre-execution.
272
+
-`OSC 133 ; D [; <exitcode>] ST`: Mark execution finished with an optional exit code.
273
273
274
274
### iTerm2 shell integration
275
275
276
276
The following sequences that iTerm2 pioneered are supported:
277
277
278
-
-`OSC 1337 ; CurrentDir=<Cwd> S` - Sets the current working directory of the terminal, similar to `OSC 633 ; P ; Cwd=<Cwd> ST`.
279
-
-`OSC 1337 ; SetMark ST` - Adds a mark to the left of the line it was triggered on and also adds an annotation to the scroll bar:
278
+
-`OSC 1337 ; CurrentDir=<Cwd> S`: Sets the current working directory of the terminal, similar to `OSC 633 ; P ; Cwd=<Cwd> ST`.
279
+
-`OSC 1337 ; SetMark ST`: Adds a mark to the left of the line it was triggered on and also adds an annotation to the scroll bar:
280
280
281
281

0 commit comments