Skip to content

VSCode Extension Development: Send Command to Terminal without entering textย #201680

Closed
@zqstack

Description

At this moment I can run a command in the terminal by sending text (terminal.sendText()) to it. Now I would like to run a command without displaying the command, but only its output, like I can do with NPM scripts.

For example when echoing in color or basically any command. I'd rather output custom logs, such as:

  • Starting script..
  • Completed step 1
  • Completed step 2
  • Done (In green color)

Instead of:
echo -e '\x1b[32mOpen terminal\x1b[0m'
Open terminal (in green color)

I would propose:
terminal.sendCommand( command: string, showInput?: boolean )
terminal.sendOutput( text: string, color?: Color )

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

*out-of-scopePosted issue is not in scope of VS Codefeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions