Closed greyhoundforty closed 4 years ago
Could you do something like trap myCleanupFunc EXIT
? And define the stuff you want to do on cleanup in myCleanupFunc
@rnewton trap myCleanupFunc EXIT
would run the function once the desk script is run on desk initialization.
It would be great if there was a way to run a script when using the
exit
command to leave a desk session. For instance I have a desk session setup when I am working on some specific github repos for work and sometimes I forgot to run the git add and commit commands before leaving my desk session. Not really a huge deal as I can still run them from a normal shell, but would be useful to run a cleanup script upon exit.