ssh agent now only started if it is not running already

This commit is contained in:
Sheppy
2017-04-05 21:47:17 +02:00
parent ebdc59f0f1
commit 75329c2a4a
2 changed files with 12 additions and 1 deletions

11
zshrc
View File

@@ -68,6 +68,13 @@ alias ..='cd ..'
## Anti-LD-Preload Chromium Wrapper ##
alias chromium="export TMP_PRELD=$LD_PRELOAD && /bin/bash -c 'unset LD_PRELOAD && chromium' && export LD_PRELOAD=$TMP_PRELD"
## GIT ##
alias gstat="git status"
alias gpull="git pull"
alias gpush="git push"
alias gcom="git commit -a"
alias gadd="git add"
## LOCKS ##
if [[ $HOST =~ atlantis* ]]; then
alias i3lock="i3lock --image=/home/ik15ydit/.config/i3lock/bg.png"
@@ -188,7 +195,9 @@ alias l="ls -lh --color=auto"
## SSH-KEYS ##
gitssh=~/.ssh/gitrsa
function key(){
eval `ssh-agent`
if [[ -z $SSH_AUTH_SOCK ]]; then
eval `ssh-agent`
fi
ssh-add $gitssh
}