Skip to content

Commit be3bb47

Browse files
authored
fix(docs): update shell integration settings.json codeblock
Updated the `settings.json` codeblock according to the current [schema](https://aka.ms/terminal-profiles-schema) - Refactored the `actions` array to reflect the current element structure which no longer stores associated keystrokes as it appears shortcut definitions have been moved into the `keybindings` prop - Removed the `selectCommand`/`selectOutput` actions as they don't appear to be valid anymore given the current `ShortcutActionName` enums
1 parent dc84e27 commit be3bb47

File tree

1 file changed

+22
-27
lines changed

1 file changed

+22
-27
lines changed

TerminalDocs/tutorials/shell-integration.md

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -58,33 +58,28 @@ Supporting these features requires cooperation between your shell and the Termin
5858
To enable these features in the Terminal, you'll want to add the following to your settings:
5959

6060
```json
61-
"profiles":
62-
{
63-
"defaults":
64-
{
65-
// Enable marks on the scrollbar
66-
"showMarksOnScrollbar": true,
67-
68-
// Needed for both pwsh, CMD and bash shell integration
69-
"autoMarkPrompts": true,
70-
71-
// Add support for a right-click context menu
72-
// You can also just bind the `showContextMenu` action
73-
"experimental.rightClickContextMenu": true,
74-
},
75-
}
76-
"actions":
77-
[
78-
// Scroll between prompts
79-
{ "keys": "ctrl+up", "command": { "action": "scrollToMark", "direction": "previous" }, },
80-
{ "keys": "ctrl+down", "command": { "action": "scrollToMark", "direction": "next" }, },
81-
82-
// Add the ability to select a whole command (or its output)
83-
{ "command": { "action": "selectOutput", "direction": "prev" }, },
84-
{ "command": { "action": "selectOutput", "direction": "next" }, },
85-
86-
{ "command": { "action": "selectCommand", "direction": "prev" }, },
87-
{ "command": { "action": "selectCommand", "direction": "next" }, },
61+
"profiles": {
62+
"defaults": {
63+
// Enable marks on the scrollbar
64+
"showMarksOnScrollbar": true,
65+
66+
// Needed for both pwsh, CMD and bash shell integration
67+
"autoMarkPrompts": true,
68+
69+
// Add support for a right-click context menu
70+
// You can also just bind the `showContextMenu` action
71+
"experimental.rightClickContextMenu": true,
72+
},
73+
},
74+
"actions": [
75+
// Create actions/commands for scrolling to previous/next mark
76+
{ "command": { "action": "scrollToMark", "direction": "previous" }, "id": "Terminal.ScrollToPreviousMark" }
77+
{ "command": { "action": "scrollToMark", "direction": "next" }, "id": "Terminal.ScrollToNextMark" }
78+
],
79+
"keybindings": [
80+
// Define hotkeys/shortcuts for these actions by referencing the prior (user-)assigned IDs
81+
{ "id": "Terminal.ScrollToPreviousMark", "keys": "ctrl+up" }
82+
{ "id": "Terminal.ScrollToNextMark", "keys": "ctrl+down" }
8883
]
8984
```
9085

0 commit comments

Comments
 (0)