aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--_zlogout11
1 files changed, 9 insertions, 2 deletions
diff --git a/_zlogout b/_zlogout
index 1db6ba0..52569f3 100644
--- a/_zlogout
+++ b/_zlogout
@@ -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