]> arthur.barton.de Git - ax-zsh.git/commitdiff
gnupg: Read in ~/.gpg-agent-info file
authorAlexander Barton <alex@barton.de>
Tue, 1 Dec 2015 14:02:05 +0000 (15:02 +0100)
committerAlexander Barton <alex@barton.de>
Tue, 1 Dec 2015 14:02:05 +0000 (15:02 +0100)
plugins/gnupg/gnupg.zshrc

index 23c0a9a1604ef7755e08859407c30e3835e3ebf9..39f605d5e01de7013b168ff191afa58f9083ed0e 100644 (file)
@@ -10,3 +10,9 @@ if (( $+commands[gpg2] )); then
                alias gpg="gpg2"
        fi
 fi
+
+if [[ -z "$GPG_AGENT_INFO" && -r ~/.gpg-agent-info ]]; then
+       # Read environment file
+       source ~/.gpg-agent-info 2>/dev/null
+       [[ -n "$GPG_AGENT_INFO" ]] && export GPG_AGENT_INFO
+fi