Put temporary files under `/run/user/<id>` if available (`$XDG_RUNTIME_DIR`) and clean them up at shell exit
whisperity opened this issue ยท 4 comments
whisperity commented
- Use
$XDG_RUNTIME_DIR
for envprobe shell-specific root. - Clean up the config files and whatnot for exiting shells.
whisperity commented
Implemented the first half (using $XDG_RUNTIME_DIR
) for the upcoming new version.
whisperity commented
It's not possible (excluding very weird hacks) to detect if a non-login shell exited. Usually, shells run by users in terminal emulators are not login shells... so I'm scrapping the second idea of this issue, and closing it down with the first.
whisperity commented
Reopening. Thanks to @christianparpart, it seems a trap funcname EXIT
"hook" should make the cleanup possible.
whisperity commented
Done. ๐ ZSH's trap "functions" suck, but I figured it out.