diff options
author | Aaron LI <aly@aaronly.me> | 2017-10-20 08:29:44 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-10-20 08:29:44 +0800 |
commit | 1469b67806d95d026ebc4037bf44f72f0ef170e8 (patch) | |
tree | c762b460daf78fab1f136fa11abf9e86db539c9f /_zlogout | |
parent | 2b381b69a349eb7cf2b39b5e72595dd5e8ffb8c3 (diff) | |
download | dotfiles-1469b67806d95d026ebc4037bf44f72f0ef170e8.tar.bz2 |
zsh: flush gpg-agent passphrases on logout
Diffstat (limited to '_zlogout')
-rw-r--r-- | _zlogout | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1,9 +1,16 @@ # # ~/.zlogout -# executed when a login zsh shell exits +# Executed when a *login* zsh shell exits # +# Aaron LI +# + +# Flush the cached passphrases on logout, but except for SSH connections +if [[ -z ${SSH_CONNECTION} ]]; then + gpgconf --reload gpg-agent +fi -# clear console +# Clear console if which clear >/dev/null 2>&1; then clear elif which tput >/dev/null 2>&1; then |