]> arthur.barton.de Git - ax-zsh.git/blob - plugins/gnupg/gnupg.zshrc
keychain: Don't test for agents, it's done by keychain itself
[ax-zsh.git] / plugins / gnupg / gnupg.zshrc
1 # AX-ZSH: Alex' Modular ZSH Configuration
2 # gnupg.zshrc: Setup GnuPG
3
4 if (( $+commands[gpg2] )); then
5         # Use the gpg completions for gpg2, too
6         compdef gpg2=gpg
7
8         if ! (( $+commands[gpg])); then
9                 # gpg2 is available, but no gpg: alias it!
10                 alias gpg="gpg2"
11         fi
12 fi
13
14 if [[ -z "$GPG_AGENT_INFO" && -r ~/.gpg-agent-info ]]; then
15         # Read environment file
16         source ~/.gpg-agent-info 2>/dev/null
17         [[ -n "$GPG_AGENT_INFO" ]] && export GPG_AGENT_INFO
18 fi