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
Reuse of a terminal. Not necessarily the terminal process more the terminal pane. If the user executes a task and the task finishes and runs the task again it would be cool if the output of the task could show up in the same terminal. Constantly pressing a key to close and old terminal might not be very intuitive.
For January we decided to keep the task in the core. So there is no need to make this 'public' API now. May be it would be good to first experiment a little with the new API.
Dirk Bäumer (@dbaeumer) just to make sure, were you thinking of using a waitOnExit prompt (press any key to close) that can be reused? Or a terminal that executes something, the pty process dies and just sits there ("dead") until another task command is sent?
create a new terminal and allow terminal reuse (could be an additional option) without actually running a terminal right away (if necessary we could run it as well)
run a command in the terminal. This will create the actual shell process. Usually the shell would be started with /c
receive an exit event when the shell exists
reuse the terminal to run another command in the terminal which creates a new shell process.
Use case if for a build task: if the user runs the build tasks 3 times in a row I would like to have one terminal (e.g. on entry in the drop down in the terminal pane) which contains the output of all three task runs.
Daniel Imms (@Tyriar) I have one additional question. Does the terminal require to run a shell or would the terminal be able to run any other arbitrary process (for example a node.exe).
Daniel Imms (@Tyriar) I got it working to run an arbitrary program. Only drawback is that I needed to specify the full path to the program (e.g. "C:\\Program Files\\nodejs\\node.exe"). Any idea why this is the case?
Dirk Bäumer (@dbaeumer) do you mean the shell path you're using is node and it's not working like that? I guess the PATH resolution stuff is contained within cmd, I would think it would probably be safest to always wrap the command within cmd /c or sh -c.
Wrapping the command means the process will die when it finishes so I don't see a downside?
Daniel Imms (@Tyriar) the only problem is argument passing with spaces contained. If you call node directly then you pass the args as a string[]. If you call the cmd.exe for example you need to construct a single string with proper arg quoting to ensure everything works when for example the command to call contains spaces.
Activity
dbaeumer commentedon Jan 11, 2017
For January we decided to keep the task in the core. So there is no need to make this 'public' API now. May be it would be good to first experiment a little with the new API.
Tyriar commentedon Jan 11, 2017
Dirk Bäumer (@dbaeumer) just to make sure, were you thinking of using a
waitOnExitprompt (press any key to close) that can be reused? Or a terminal that executes something, the pty process dies and just sits there ("dead") until another task command is sent?dbaeumer commentedon Jan 12, 2017
Daniel Imms (@Tyriar) I would like to achieve the following:
Use case if for a build task: if the user runs the build tasks 3 times in a row I would like to have one terminal (e.g. on entry in the drop down in the terminal pane) which contains the output of all three task runs.
dbaeumer commentedon Jan 12, 2017
Daniel Imms (@Tyriar) I have one additional question. Does the terminal require to run a shell or would the terminal be able to run any other arbitrary process (for example a node.exe).
dbaeumer commentedon Jan 12, 2017
Daniel Imms (@Tyriar) I got it working to run an arbitrary program. Only drawback is that I needed to specify the full path to the program (e.g.
"C:\\Program Files\\nodejs\\node.exe"). Any idea why this is the case?Tyriar commentedon Jan 12, 2017
Dirk Bäumer (@dbaeumer) do you mean the shell path you're using is
nodeand it's not working like that? I guess thePATHresolution stuff is contained withincmd, I would think it would probably be safest to always wrap the command withincmd /corsh -c.Wrapping the command means the process will die when it finishes so I don't see a downside?
dbaeumer commentedon Jan 12, 2017
Daniel Imms (@Tyriar) the only problem is argument passing with spaces contained. If you call node directly then you pass the args as a string[]. If you call the cmd.exe for example you need to construct a single string with proper arg quoting to ensure everything works when for example the command to call contains spaces.
And you save a process :-)
Clean up old process and handle listeners better
gandhis1 commentedon Jan 18, 2017
Don Jayamanne (@DonJayamanne) could this be useful for Python terminal execution?
Clean up old process and handle listeners better