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