]> git.sev.monster Git - dotfiles.git/blame - base/.zlogout
gpg: expand forwarding, add default-recipient-self
[dotfiles.git] / base / .zlogout
CommitLineData
715a3ed9 1# gpg forward cleanup
2if [[ $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[[ -o interactive ]] && echo logout
189288f7 21clear
81c3957e 22
23### load site-specific
24if [[ -f ~/.zlogout.local ]] { source ~/.zlogout.local }
25
26# vim: set et sts=4 sw=4 ts=8 tw=79 :
This page took 0.041849 seconds and 4 git commands to generate.