fix: use $USERNAME guaranteed to always be defined in zsh

Fixes #9701
This commit is contained in:
Marc Cornellà
2021-03-25 12:08:00 +01:00
parent 95a06f3927
commit 02d07f3e3d
15 changed files with 30 additions and 30 deletions

View File

@ -61,11 +61,11 @@ zstyle -b :omz:plugins:ssh-agent agent-forwarding _agent_forwarding
if [[ $_agent_forwarding == "yes" && -n "$SSH_AUTH_SOCK" ]]; then
# Add a nifty symlink for screen/tmux if agent forwarding
[[ -L $SSH_AUTH_SOCK ]] || ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USER-screen
[[ -L $SSH_AUTH_SOCK ]] || ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USERNAME-screen
elif [[ -f "$_ssh_env_cache" ]]; then
# Source SSH settings, if applicable
. $_ssh_env_cache > /dev/null
if [[ $USER == "root" ]]; then
if [[ $USERNAME == "root" ]]; then
FILTER="ax"
else
FILTER="x"