summary refs log tree commit diff stats
path: root/zsh
diff options
context:
space:
mode:
authorAlan Pearce2017-08-21 13:53:49 +0200
committerAlan Pearce2017-08-21 13:53:49 +0200
commit551a4823350285057f682ef6329d347042e1a157 (patch)
tree2a00bd649c3f11e967e8b22babd3df60ba99f661 /zsh
parentd7a42ad3cef9f13d56038e18e803dcd880df9fe1 (diff)
downloadnixfiles-551a4823350285057f682ef6329d347042e1a157.tar.lz
nixfiles-551a4823350285057f682ef6329d347042e1a157.tar.zst
nixfiles-551a4823350285057f682ef6329d347042e1a157.zip
zsh: Don't init gnupg on macOS.
Assume GPG Tools are installed instead
Diffstat (limited to 'zsh')
-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 b7a20b9c..91d5e011 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