summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2017-08-21 13:53:49 +0200
committerAlan Pearce2017-08-21 13:53:49 +0200
commit551a4823350285057f682ef6329d347042e1a157 (patch)
tree2a00bd649c3f11e967e8b22babd3df60ba99f661
parentd7a42ad3cef9f13d56038e18e803dcd880df9fe1 (diff)
downloaddotfiles-551a4823350285057f682ef6329d347042e1a157.tar.lz
dotfiles-551a4823350285057f682ef6329d347042e1a157.tar.zst
dotfiles-551a4823350285057f682ef6329d347042e1a157.zip
zsh: Don't init gnupg on macOS.
Assume GPG Tools are installed instead
-rw-r--r--zsh/.config/zsh/.zshrc4
1 files changed, 2 insertions, 2 deletions
diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc
index b7a20b9..91d5e01 100644
--- a/zsh/.config/zsh/.zshrc
+++ b/zsh/.config/zsh/.zshrc
@@ -106,7 +106,7 @@ bindkey '\e ' hist-complete
 zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|=*' 'l:|=* r:|=*'
 zstyle ':completion:*' completer _expand _complete _match
 
-if [[ -n $commands[gpg-connect-agent] ]]
+if [[ $os -ne "darwin" && -n $commands[gpg-connect-agent] ]]
 then
   # When using SSH support, use the current TTY for passphrase prompts
   gpg-connect-agent updatestartuptty /bye > /dev/null
@@ -117,7 +117,7 @@ then
   else
     echo "$(gpgconf --list-dirs agent-ssh-socket) doesn't exist. Is gpg-agent running ?"
   fi
-elif [[ -z $SSH_AUTH_SOCK && $commands[ssh-agent] ]]
+elif [[ -z "$SSH_AUTH_SOCK" && -n $commands[ssh-agent] ]]
 then
   eval $(ssh-agent)
 fi