Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: focus specific terminal; create new terminal with options; optionally reuse specific terminal for runInTerminal; #45

Merged
merged 12 commits into from
Mar 4, 2023
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ node_modules
*.vsix
*.todo
*.vs
*.code-workspace

scripts/generateJsonSchema.js
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,29 @@ Example for a 2x2 grid:
},
```

### `commands.runInTerminal` Create new terminal and send text
### `commands.focusTerminal` Focus specific terminal

```js
"Focus newest non-task terminal": {
"command": "commands.focusTerminal",
},
"Focus terminal named 'foobar' (string argument)": {
"command": "commands.focusTerminal",
"args": "foobar"
},
"Focus terminal named 'foobar'": {
"command": "commands.focusTerminal",
"args": {
"target": "newest",// focus newest matching terminal; create new if no match
"name": "foobar",// if no match, assign a name to the new terminal
"icon": "zap",// if no match, assign a Codicon to the new terminal
"iconColor": "terminal.ansiCyan",// if no match, assign a color (from current theme) to the new terminal
// "cwd": "",
},
},
```

### `commands.runInTerminal` Send text to new (or specified) terminal

```js
"Terminal => watch (string argument)": {
Expand All @@ -572,6 +594,9 @@ Example for a 2x2 grid:
"name": "watch",
"reveal": true,
"waitForExit": false,// will wait for terminal to exit before running next command
"reuse": "newest",// reuse newest same-named terminal; create new if no match
"icon": "zap",// if no match, assign a Codicon to the new terminal
"iconColor": "terminal.ansiCyan",// if no match, assign a color (from current theme) to the new terminal
// "cwd": "",
},
},
Expand Down
Loading