-
Notifications
You must be signed in to change notification settings - Fork 72
TerminalView
github-actions[bot] edited this page May 16, 2024
·
5 revisions
import { BottomBarPanel, TerminalView } from 'vscode-extension-tester';
...
const terminalView = await new BottomBarPanel().openTerminalView();
// get names of all available terminals
const names = await terminalView.getChannelNames();
// select a terminal from the drop box by name
await terminalView.selectChannel("Git");
await terminalView.executeCommand("git status");
Select all text and copy it to a variable. No formatting provided.
- To allow copy text in terminal on macOS, you need to add specific setup in .vscode/settings.json
"terminal.integrated.copyOnSelection": true
const text = await terminalView.getText();