Inspired by Emacs' comint-mode. Your keyboard shortcuts all work because it's just a regular text editor, with a shell inside.
Run a shell (or other repl) in a text editor.
- Use commands
comint.inputRingPreviousandcomint.inputRingNextlike your up/down arrows in the terminal emulator, to cycle through previous commands. - Use command
comint.sendCtrlCto send a control-c signal to the process. - ANSI/SGR codes for colors and some cursor movement are rendered properly (or ignored if they do not apply).
- tab-completion for bash kinda works, but only for
stty -echofor now.
See notes/comments at the top of extension.ts. TODO move them somewhere better.
This doesn't work in vscode.dev or similar. You must have the ability to run an interactive process.
This extension contributes the following settings:
comint.shellFile:comint.shellFileArgs:comint.shellInitCommands:comint.promptRegex:
Only tested on osx with bash 5.x
Several.