-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
Terminal should throw an event when a terminal has completed (and is waiting to close) #18376
Comments
What I actually want to do is the following: this.terminalService.createInstance(`Task: ${task.name}`, undefined, ['/C', 'dir'], false);
What I would like to see happening here is that the cmd.exe is started, dir is executed and then cmd.exe terminates. When cmd.exe terminates I would like to get an event. Regarding the '/C' option: any change to have this abstracted in the terminal itself. Having that knowledge on the client side is not very nice. |
What currently happens is the following:
|
I changed it to |
Did you call It would be good to encapsulate the bash and cmd command execution commands inside the TerminalService, however I'm not sure something like that should be exposed in the Terminal API. In general I don't want to encourage using a custom shell/args unless the specific use case calls for it (like tasks). |
I got it working passing in true to let terminal = this.terminalService.createInstance(`Task: ${task.name}`, 'C:\\WINDOWS\\system32\\cmd.exe', ['/C', this.configuration.command], true);
this.terminalService.setActiveInstance(terminal);
this.terminalService.showPanel(false); What I actually would like to have is a listener instead of the waitOnExit. But we already discussed this. Any advice on how to improve this? |
Regarding:
As said we keep the task framework in the core for now. So it would allow us to experiment with some API here before thinking about making it official. |
@dbaeumer I guess I'll expose some event on |
I closed this as it's possible internally now via |
Can you help me on how I get the state of the terminal - e.g. it finished running whatever command? I can't find any help in the documentation. |
From @dbaeumer:
The text was updated successfully, but these errors were encountered: