mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-07-01 20:59:26 +00:00
committed by
Sorin Ionescu
parent
5232191cbe
commit
fb9a20591f
@ -10,13 +10,13 @@ Settings
|
||||
|
||||
To enable ssh-agent forwarding, add the following line to *zshrc*:
|
||||
|
||||
zstyle ':omz:module:ssh-agent' forwarding 'yes'
|
||||
zstyle ':prezto:module:ssh-agent' forwarding 'yes'
|
||||
|
||||
### Identities
|
||||
|
||||
To load multiple identities, add the following line to *zshrc*:
|
||||
|
||||
zstyle ':omz:module:ssh-agent' identities 'id_rsa' 'id_rsa2' 'id_github'
|
||||
zstyle ':prezto:module:ssh-agent' identities 'id_rsa' 'id_rsa2' 'id_github'
|
||||
|
||||
Authors
|
||||
-------
|
||||
@ -32,5 +32,5 @@ Authors
|
||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||
|
||||
[1]: http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-agent&sektion=1
|
||||
[2]: https://github.com/sorin-ionescu/oh-my-zsh/issues
|
||||
[2]: https://github.com/sorin-ionescu/prezto/issues
|
||||
|
||||
|
@ -29,7 +29,7 @@ function _ssh-agent-start {
|
||||
source "${_ssh_agent_env}" > /dev/null
|
||||
|
||||
# Load identities.
|
||||
zstyle -a ':omz:module:ssh-agent' identities 'identities'
|
||||
zstyle -a ':prezto:module:ssh-agent' identities 'identities'
|
||||
|
||||
if (( ${#identities} > 0 )); then
|
||||
ssh-add "${HOME}/.ssh/${^identities[@]}"
|
||||
@ -39,7 +39,7 @@ function _ssh-agent-start {
|
||||
}
|
||||
|
||||
# Test if agent-forwarding is enabled.
|
||||
zstyle -b ':omz:module:ssh-agent' forwarding '_ssh_agent_forwarding'
|
||||
zstyle -b ':prezto:module:ssh-agent' forwarding '_ssh_agent_forwarding'
|
||||
if is-true "${_ssh_agent_forwarding}" && [[ -n "$SSH_AUTH_SOCK" ]]; then
|
||||
# Add a nifty symlink for screen/tmux if agent forwarding.
|
||||
[[ -L "$SSH_AUTH_SOCK" ]] || ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USER-screen
|
||||
|
Reference in New Issue
Block a user