Open matu3ba opened 1 year ago
# see https://unix.stackexchange.com/questions/520035/exit-trap-with-posix # Using signal numbers as complete solution is not portable and listing all signal # names is ugly/unreadable CWD=$(pwd) trap "cd ${CWD}" EXIT HUP INT QUIT SIGSEGV TERM