Open florentsolt opened 5 years ago
I agree, but I don't think we can currently detect if the terminal is busy executing the command in question or not.
You can get from tmux (reading the content of the dir where it stores the sockets) and screen (via screen -ls
) the list of active sessions (regarding the names you have in the conf) and assume they are running. Wort case scenario, the command is not running anymore, but should be in the shell history inside the screen/tmux.
@florentsolt I'm not sure that's a good enough solution 🤔
am also having the same issue but with long lived commands like npm watch
, the temp solution is to make sure the command have "recycle": false
this way it will create a new terminal every time u run it and you wont get an un-expected rerun of the same command when u kill it, ex.
npm watch
4 timesHm, how do I exactly put screen -ls
check in my commands sequence to deny others to run when it returns existing session? Thank you in advance!
When a persistent terminal is already running, do not re-execute the command. As seen here https://github.com/fabiospampinato/vscode-terminals/blob/master/resources/persistent.gif when you re-open the terminal, the "while...." command is re send to the terminal. It should not be done IMHO.