X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/blobdiff_plain/03bc64c4e89dadccb97ce8d1e22477ab8b7210dc..975ad64b1891b5653db9816fd95550896ae2a7a8:/base/.zlogout diff --git a/base/.zlogout b/base/.zlogout index 249979e..64591b6 100644 --- a/base/.zlogout +++ b/base/.zlogout @@ -1,2 +1,20 @@ -echo logout -clear +### cleanup +# XXX: since .zlogout isn't guaranteed to have been run in the same shell as +# our .zprofile was (since we source it in .zshenv for SHLVL=1 among other +# situations) we are not guaranteed to clean up our current session's tmp, +# but it should be cleared out on next session launch +_sev_zcleanup +## unset vars that use our tmp since above will remove them +unset XDG_CACHE_HOME XDG_RUNTIME_DIR +## clean up any remaining sockets from gpg forwarding +[[ -v _GNUPG_SOCK_DEST_BASE ]] && rm -f $_GNUPG_SOCK_DEST_BASE*(N=) + +if [[ -o interactive ]] { + echo logout + clear +} + +### load site-specific +if [[ -f ~/.zlogout.local ]] { source ~/.zlogout.local } + +# vim: et sts=4 sw=4 ts=8 tw=79