Manage ssh-add in .zshrc
This commit is contained in:
parent
90972c478f
commit
1915b9bdbf
|
@ -2,6 +2,14 @@ if test -f /usr/share/doc/fzf/examples/completion.zsh &> /dev/null; then
|
|||
source /usr/share/doc/fzf/examples/completion.zsh
|
||||
fi
|
||||
|
||||
ssh_ids=$(find "$HOME/.ssh" -type f -name "id*" | grep -v '\.pub')
|
||||
if [[ "$ssh_ids" != "" ]]; then
|
||||
eval "$(ssh-agent -s)" &> /dev/null
|
||||
for id in $(echo $ssh_ids); do
|
||||
ssh-add "$id" &> /dev/null
|
||||
done
|
||||
fi
|
||||
|
||||
HISTFILE=~/.histfile
|
||||
HISTSIZE=SAVEHIST=100000000
|
||||
setopt appendhistory autocd notify
|
||||
|
|
Loading…
Reference in New Issue