Skip to content

Commit 836c634

Browse files
committed
Fix bug in ssh-agent handling
1 parent 7d7cc9c commit 836c634

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

zsh/.zshrc

+5-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ load-our-ssh-keys() {
8383
fi
8484
}
8585

86-
load-our-ssh-keys
86+
if [[ -n "$SSH_CLIENT" ]]; then
87+
# We're not on a remote machine, so load keys
88+
load-our-ssh-keys
89+
fi
8790

8891
# Now that we have $PATH set up and ssh keys loaded, configure zgen.
8992

@@ -359,4 +362,4 @@ if [[ -z "$DONT_PRINT_SSH_KEY_LIST" ]]; then
359362
echo "Current SSH Keys:"
360363
ssh-add -l
361364
echo
362-
fi
365+
fi

0 commit comments

Comments
 (0)