Start ssh agent everywhere.
This commit is contained in:
parent
605d89896f
commit
a3ca6e4701
2 changed files with 9 additions and 0 deletions
|
@ -21,6 +21,9 @@ source $ZDOTDIR/keys.zsh
|
|||
# aliases
|
||||
source $ZDOTDIR/aliases.zsh
|
||||
|
||||
# ssh
|
||||
source $ZDOTDIR/ssh.zsh
|
||||
|
||||
# plugins & addons
|
||||
[ -f $XDG_CONFIG_HOME/fzf/fzf.zsh ] && source $ZDOTDIR/fzf.zsh
|
||||
source $ZDOTDIR/modules/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
|
|
6
zsh/ssh.zsh
Normal file
6
zsh/ssh.zsh
Normal file
|
@ -0,0 +1,6 @@
|
|||
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
|
||||
ssh-agent > "$XDG_CACHE_HOME/ssh-agent.env"
|
||||
fi
|
||||
if [[ ! "$SSH_AUTH_SOCK" ]]; then
|
||||
source "$XDG_CACHE_HOME/ssh-agent.env" >/dev/null
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue