Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion prestobuntu.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ alias Ga='git add'
# Fix ssh-agent for screen
# https://gist.github.com/martijnvermaat/8070533#gistcomment-1317075
if [[ -S "$SSH_AUTH_SOCK" && ! -h "$SSH_AUTH_SOCK" ]]; then
mkdir -p ~/.ssh
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
fi
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock

# Only adopt the stable symlink if it resolves to a live socket (-S
# follows symlinks). Exporting it unconditionally points SSH_AUTH_SOCK
# at a dangling path when no agent is running, which silently breaks
# agent forwarding into this shell.
if [[ -S ~/.ssh/ssh_auth_sock ]]; then
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
fi