summary refs log tree commit diff stats
path: root/tag-zsh/config/zsh/zshrc
diff options
context:
space:
mode:
authorAlan Pearce2016-07-19 12:47:01 +0200
committerAlan Pearce2016-07-19 12:47:01 +0200
commita58e033e366f7a5776e6d53ac45b44a426aadbd2 (patch)
tree1da440365499b36bf8af5da48500b41e5fb4be22 /tag-zsh/config/zsh/zshrc
parent5203a119ddf35b02cf95e7e7f40f4e1f3d78c382 (diff)
downloadnixfiles-a58e033e366f7a5776e6d53ac45b44a426aadbd2.tar.lz
nixfiles-a58e033e366f7a5776e6d53ac45b44a426aadbd2.tar.zst
nixfiles-a58e033e366f7a5776e6d53ac45b44a426aadbd2.zip
zsh: Setup SSH auth sock if empty
Diffstat (limited to 'tag-zsh/config/zsh/zshrc')
-rw-r--r--tag-zsh/config/zsh/zshrc5
1 files changed, 5 insertions, 0 deletions
diff --git a/tag-zsh/config/zsh/zshrc b/tag-zsh/config/zsh/zshrc
index 3e568cd4..7fcacd3a 100644
--- a/tag-zsh/config/zsh/zshrc
+++ b/tag-zsh/config/zsh/zshrc
@@ -96,6 +96,11 @@ bindkey '\e	' hist-complete
 zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' '+m:{A-Z}={a-z}'
 zstyle ':completion:*' completer _expand _complete _match
 
+if [[ -z $SSH_AUTH_SOCK && $commands[ssh-agent] ]]
+then
+	eval $(ssh-agent)
+fi
+
 if zplug check Tarrasch/zsh-autoenv
 then
 	AUTOENV_FILE_ENTER=.envrc