From 21e0372b7d5ddcf759107a1cab2b31b67dda5333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Combes?= Date: Mon, 15 Dec 2014 16:13:24 +0100 Subject: [PATCH] fix(ssh): Use LOGNAME instead of USER or (id -un) --- modules/ssh/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ssh/init.zsh b/modules/ssh/init.zsh index 404c7ef3..f632328d 100644 --- a/modules/ssh/init.zsh +++ b/modules/ssh/init.zsh @@ -25,7 +25,7 @@ if [[ ! -S "$SSH_AUTH_SOCK" ]]; then source "$_ssh_agent_env" 2> /dev/null # Start ssh-agent if not started. - if ! ps -U "$(id -un)" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then + if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then eval "$(ssh-agent | sed '/^echo /d' | tee "$_ssh_agent_env")" fi fi