mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 05:40:08 +00:00
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').
This commit is contained in:
parent
142ad842d7
commit
53c3567cc3
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue