Add an SSH agent
This commit is contained in:
parent
0d5afb169a
commit
d1800d918a
1 changed files with 8 additions and 0 deletions
|
@ -32,6 +32,14 @@ if [ -f "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.
|
||||||
. "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
. "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# SSH agent
|
||||||
|
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
|
||||||
|
ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env"
|
||||||
|
fi
|
||||||
|
if [[ ! -f "$SSH_AUTH_SOCK" ]]; then
|
||||||
|
source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
# Aliases
|
# Aliases
|
||||||
[ -f "$MY_CONFIG/.aliases" ] && . "$MY_CONFIG/.aliases"
|
[ -f "$MY_CONFIG/.aliases" ] && . "$MY_CONFIG/.aliases"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue