summaryrefslogtreecommitdiff
path: root/plugins/ssh-agent
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2014-09-30 11:33:42 +0200
committerMarc Cornellà <marc.cornella@live.com>2016-09-03 20:49:55 +0200
commit53c3567cc395127d6ba90b8a010e8f7a48a16713 (patch)
tree0dd86eeb707cccb9ec40ea7d74dd984aafd25e28 /plugins/ssh-agent
parent142ad842d706e16317bcc8b44ef1b19d625d1fb8 (diff)
downloadzsh-53c3567cc395127d6ba90b8a010e8f7a48a16713.tar.gz
zsh-53c3567cc395127d6ba90b8a010e8f7a48a16713.tar.bz2
zsh-53c3567cc395127d6ba90b8a010e8f7a48a16713.zip
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').
Diffstat (limited to 'plugins/ssh-agent')
-rw-r--r--plugins/ssh-agent/ssh-agent.plugin.zsh2
1 files changed, 1 insertions, 1 deletions
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