You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ITerminalInstance.reuseTerminal only works if terminal is still running #18661
I would like to reuse a terminal instance where the shell / executable has already finished. To make this happen I would like to pass an argument to the createInstance via the IShellLaunchConfig that allows the following values. The new property would replace the current waitOnExit. It could be named 'onExit' and accept the following enum values: wait: would be the same as waitOnExit: true, close: would be the same as waitOnExit: false, keep: would keep the terminal instance alive. If reuseTerminal is call a new shell / pty process is start if non is running.
No, I want to keep the part without anything running in it. Consider a build task that is non watching and the user triggers build from time to time. I would like to collect the output from every build run in the same terminal pane although they are different pty processes. The reason is that I think that there is no way to find out whether a terminal is idle (there is a prompt in the command accepting user input). So I start the shell with /c so that it exits when the build command is finish.
Dirk Bäumer (@dbaeumer) yes, but would it be ideal for the key press to exit to be visible even when the terminal is being reused.
For example:
$ some task
...
...
Press and key to close terminal
Start another task ("Press any key to close terminal" line is cleared before launch):
$ some task
...
...
$ some other task
...
...
Press and key to close terminal
Alternatively:
$ some task
...
...
Start another task ("Press any key to close terminal" line is cleared before launch):
$ some task
...
...
$ some other task
...
...
I suspect both might be useful to extension authors but if you're not interested in the first case, maybe I should just get rid of the press any key to close thing all together?
Daniel Imms (@Tyriar) actually both would work. Showing the Press any key to close the terminal is something I would like to show/see if I have to read what is in the terminal. A kind of reminder. This is why I would like to have for the reuse case the alternative approach you outlined.
Activity
Tyriar commentedon Jan 17, 2017
So you want waitOnExit without the key press to exit part? Is that the only issue with reuseTerminal right now?
dbaeumer commentedon Jan 17, 2017
No, I want to keep the part without anything running in it. Consider a build task that is non watching and the user triggers build from time to time. I would like to collect the output from every build run in the same terminal pane although they are different pty processes. The reason is that I think that there is no way to find out whether a terminal is idle (there is a prompt in the command accepting user input). So I start the shell with /c so that it exits when the build command is finish.
Tyriar commentedon Jan 17, 2017
Dirk Bäumer (@dbaeumer) yes, but would it be ideal for the key press to exit to be visible even when the terminal is being reused.
For example:
Start another task ("Press any key to close terminal" line is cleared before launch):
Alternatively:
Start another task ("Press any key to close terminal" line is cleared before launch):
I suspect both might be useful to extension authors but if you're not interested in the first case, maybe I should just get rid of the press any key to close thing all together?
dbaeumer commentedon Jan 18, 2017
Daniel Imms (@Tyriar) actually both would work. Showing the
Press any key to close the terminalis something I would like to show/see if I have to read what is in the terminal. A kind of reminder. This is why I would like to have for the reuse case the alternative approach you outlined.Remove waitOnExit option from Terminal API
Tyriar commentedon Mar 1, 2017
No longer needed, closing off.