improve use of keychain

This commit is contained in:
Sami Samhuri 2011-11-27 07:23:14 +00:00
parent 3c9c6bbd30
commit 133d39a065

View file

@ -379,6 +379,13 @@ compinit
# ================ # ================
# OS X includes keychain now, cool. # OS X includes keychain now, cool.
if command_exists keychain; then if command_exists keychain; then
keychain --nogui ~/.ssh/id_rsa ~/.ssh/id_rsa-dreamhost if [[ -f ~/.ssh/id_rsa ]]; then
source "~/.keychain/$(hostname)-sh" >/dev/null keychain --nogui ~/.ssh/id_rsa
elif [[ -f ~/.ssh/id_rsa-dreamhost ]]; then
keychain --nogui ~/.ssh/id_rsa-dreamhost
fi
KEYCHAINFILE="$HOME/.keychain/$(hostname)-sh"
if [[ -f $KEYCHAINFILE ]]; then
source $KEYCHAINFILE >/dev/null
fi
fi fi