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

Feature Request: API: Subscribe to the "data" event on a terminal #16989

Closed
KalitaAlexey opened this issue Dec 9, 2016 · 1 comment
Closed
Assignees
Labels
api *duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality

Comments

@KalitaAlexey
Copy link

KalitaAlexey commented Dec 9, 2016

Hi everybody,

I suggest to add a new function on to the class Terminal.

Motivation

There is an extension for Rust RustyCode.
There is a command build.
When build is finished, we parse output and show warnings, errors and etc. in user's code.
Currently it is made via the class OutputChannel, which doesn't support input.

Example

let terminal = vscode.window.createTerminal('Build');
terminal.on('data', data => {
    let buildProgress = this.parseBuildProgress(data);
    this.updateBuildProgress(buildProgress);
});
terminal.show();
terminal.sendText('make');

Alternatives

Write to a file

let terminal = vscode.window.createTerminal('Build');
terminal.show();
terminal.sendText('make |& tee /tmp/some_file');

I will implement it myself.
I am opening this issue to receive opinions.

Regards,
Alexey

@mjbvz mjbvz added api feature-request Request for new features or functionality labels Dec 9, 2016
@Tyriar
Copy link
Member

Tyriar commented Dec 9, 2016

Closing this off as a duplicate of #13337, not quite ready to accept a PR for this yet but the terminal API is one of the areas I'll be looking at in January. We have a similar need though as we want the tasks framework to use the terminal instead of output #15584

@Tyriar Tyriar closed this as completed Dec 9, 2016
@Tyriar Tyriar added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 9, 2016
@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
api *duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants