From 53c3567cc395127d6ba90b8a010e8f7a48a16713 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com>
Date: Tue, 30 Sep 2014 11:33:42 +0200
Subject: [PATCH] Force ssh-agent output to use bourne-style syntax

On systems where the shell cannot be changed because of a strict
security policy, ssh-agent will use the syntax of whatever the
default $SHELL is.
For instance, if the default shell is tcsh, ssh-agent will use the
c-shell style (setenv).

This change forces ssh-agent to use bourne-style syntax since that
has to be later interpreted by zsh. Consequently, the environment
file will contain `export' statements from now on (instead of
`setenv').
---
 plugins/ssh-agent/ssh-agent.plugin.zsh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh
index e6bc9c4e6..a84aac58c 100644
--- a/plugins/ssh-agent/ssh-agent.plugin.zsh
+++ b/plugins/ssh-agent/ssh-agent.plugin.zsh
@@ -7,7 +7,7 @@ function _start_agent() {
 	# start ssh-agent and setup environment
 	zstyle -s :omz:plugins:ssh-agent lifetime lifetime
 
-	ssh-agent ${lifetime:+-t} ${lifetime} | sed 's/^echo/#echo/' >! $_ssh_env_cache
+	ssh-agent -s ${lifetime:+-t} ${lifetime} | sed 's/^echo/#echo/' >! $_ssh_env_cache
 	chmod 600 $_ssh_env_cache
 	. $_ssh_env_cache > /dev/null