.zprofile (685B)
1 # .zprofile 2 3 # Set the terminal size if we're on a serial line. 4 if [[ -x /usr/bin/resizewin ]]; then /usr/bin/resizewin -z; fi 5 6 if [[ "$(uname)" == "Linux" && -z "$SSH_AUTH_SOCK" ]]; then 7 # ssh-agent is started by systemd; add the socket path to the environment. 8 export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" 9 elif [[ "$(uname)" == "FreeBSD" ]]; then 10 # Start ssh-agent daemon. 11 export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" 12 ssh-add -l 2>/dev/null >/dev/null 13 if [ $? -ge 2 ]; then 14 # If not already running, start ssh-agent. Stop on shell exit. 15 eval $(ssh-agent -s -a "$SSH_AUTH_SOCK") > /dev/null 16 trap 'ssh-agent -k > /dev/null' EXIT 17 fi 18 fi