]>
Commit | Line | Data |
---|---|---|
1 | # gpg forward cleanup | |
2 | if [[ $SHLVL == 1 && $GNUPGHOME =~ '.ssh_forward/\d+$' ]] { | |
3 | x=$GNUPGHOME | |
4 | # reset GNUPGHOME | |
5 | [[ -o GLOB_ASSIGN ]]; y=$? | |
6 | setopt GLOB_ASSIGN | |
7 | GNUPGHOME=$GNUPGHOME/../..(:a) | |
8 | [[ $y != 0 ]] && unsetopt GLOB_ASSIGN | |
9 | # clean dir if it exists | |
10 | if [[ -d $x ]] { | |
11 | find $x -mindepth 1 -maxdepth 1 | while read -r y; do | |
12 | unlink $y | |
13 | done | |
14 | rmdir -p $x 2>/dev/null | |
15 | } | |
16 | # clean up any remaining sockets from gpg forwarding | |
17 | rm -f $_GNUPG_SOCK_DEST_BASE*(N=) | |
18 | } | |
19 | ||
20 | # remove xdg runtime | |
21 | rm -rf $XDG_RUNTIME_DIR 2>/dev/null | |
22 | ||
23 | [[ -o interactive ]] && echo logout | |
24 | clear | |
25 | ||
26 | ### load site-specific | |
27 | if [[ -f ~/.zlogout.local ]] { source ~/.zlogout.local } | |
28 | ||
29 | # vim: et sts=4 sw=4 ts=8 tw=79 |