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] use the Terminal as a console output #17678

Closed
farfromrefug opened this issue Dec 21, 2016 · 7 comments
Closed

[FR] use the Terminal as a console output #17678

farfromrefug opened this issue Dec 21, 2016 · 7 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) terminal General terminal issues that don't fall under another label

Comments

@farfromrefug
Copy link

I would really love to see the possibility to use a terminal as console output.
The reason is that we would benefit from all amazing features from xterm.js

Obviously one is colour output.

There are actually 2 ways to do that:

  • give the possibility to run a command inside the Terminal while listening for stdout, stderr, close. Also this would allow stdin! Which would be amazing from for extensions!
  • allow to "append" text to the console without it executing a command.

I can give more details on what i am trying to achieve if necessary

@egamma egamma added the info-needed Issue requires more information from poster label Dec 21, 2016
@egamma
Copy link
Member

egamma commented Dec 21, 2016

@farfromrefug the general desire is understood, but can you be more precise when you want to use the terminal as console output: when running tasks? when debugging a program?

@farfromrefug
Copy link
Author

@egamma The idea came from my vscode extension. It's an extension to build Titanium Mobile projects (kind of like PhoneGap projects).

From the get i wanted to have a more interactive/beautiful console. I wanted a colorized console so that i could quickly and easily read the output.
So at first i used the "output colorizer" extension. It worked quite well but was really slow with long outputs, and it broke links to code (like test.js:23:2)

Now i know what xterm.js can do and i know it can fill all my requirements and even more:

  • colors: well it would work right away, and i could even use the power of node utils to colorize even more
  • links: this could be handled using the linkify addon of xterm.js. Even better, we could imagine an entry point for extensions to add new regexpfor links, and "override" the default "click" behavior.
  • stdin: well this could be very useful for extensions running command line commands. As they could use the stdin of the terminal.

I know it would require quite some work on you side, but the benefit for extensions would be quite awesome! ;)

@egamma
Copy link
Member

egamma commented Dec 21, 2016

@farfromrefug VS Code has an integrated terminal and the terminal provides API to launch a process that runs in the terminal (extensions are already using this support).

We are planning to run VS Code tasks inside the terminal and for that we are investigating into enriching the terminal API further.

@egamma egamma removed the info-needed Issue requires more information from poster label Dec 21, 2016
@siegebell
Copy link

This would be resolved if vscode had an API to launch a Node process in the terminal like how Language Servers are launched (i.e. using vscode's Node binaries).

@farfromrefug
Copy link
Author

@egamma Yes there is an api for the terminal. But we can't do much with it, we miss big features:

  • clear the terminal
  • run command and "listen" for it like you would do with exec/spawn
  • listen for stdin
  • enable / disable addon (like linkify)
  • add your own addon to xterm.js
  • disable stdin (to create a console)

@Tyriar
Copy link
Member

Tyriar commented Dec 24, 2016

@farfromrefug good suggestions, could you split this issue out into individual API requests?

The listen ones are already captured here #13337, and we currently don't use any xterm.js addons, nor are they particularly polished upstream.

@Tyriar Tyriar added terminal General terminal issues that don't fall under another label info-needed Issue requires more information from poster labels Dec 24, 2016
@Tyriar
Copy link
Member

Tyriar commented Jan 3, 2017

Thanks for creating the issues @farfromrefug, I'll close this off in favor of them now

@Tyriar Tyriar closed this as completed Jan 3, 2017
@Tyriar Tyriar added *duplicate Issue identified as a duplicate of another issue(s) and removed info-needed Issue requires more information from poster labels Jan 3, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) terminal General terminal issues that don't fall under another label
Projects
None yet
Development

No branches or pull requests

4 participants