Almenon / Almenon/AREPL-vscode
add arepl terminal
- Dominant language
- TypeScript
- Stars
- 301
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
# 1.39 release notes:
**Extension terminal API**
The extension terminal API has been finalized, allowing an extension to react to terminal input and fully control its output. The following creates an extension terminal and prints 'Hello world' in red on startup:
```typescript
const writeEmitter = new vscode.EventEmitter();
const pty: vscode.Pseudoterminal = {
onDidWrite: writeEmitter.event,
open: () => writeEmitter.fire('\x1b[31mHello world\x1b[0m'),
close: () => {}
};
```
vscode.window.createTerminal({ name: 'My terminal', pty });
See the [API reference](https://code.visualstudio.com/api/references/vscode-api) and the [extension-terminal-sample](https://github.com/microsoft/vscode-extension-samples/tree/master/extension-terminal-sample) for more details.
---
It would be cool to have a python terminal for users to try out code after a arepl run. This feature is pretty similar to #$end functionality so it's low priority unless I get a lot of +1's on this issue.
Contributor guide
Assessment
This issue has not been assessed yet.