more resilient keychain initialization

This commit is contained in:
Sami Samhuri 2012-04-23 18:07:30 -07:00
parent f2cf49ff88
commit 5bb3af14ed

View file

@ -377,12 +377,12 @@ compinit
# 10. SSH Keychain
# ================
if command_exists keychain; then
keychain --nogui ~/.ssh/id_rsa*~*.pub
KEYCHAINFILE="$HOME/.keychain/$(hostname)-sh"
if [[ -f $KEYCHAINFILE ]]; then
source $KEYCHAINFILE >/dev/null
fi
if command_exists keychain && [[ -d ~/.ssh ]]; then
keychain --nogui ~/.ssh/id_rsa*~*.pub(N)
KEYCHAINFILE="$HOME/.keychain/$(hostname)-sh"
if [[ -f $KEYCHAINFILE ]]; then
source $KEYCHAINFILE >/dev/null
fi
fi