diff options
author | Marc Cornellà <hello@mcornella.com> | 2021-03-25 12:08:00 +0100 |
---|---|---|
committer | Marc Cornellà <hello@mcornella.com> | 2021-03-25 12:08:00 +0100 |
commit | 02d07f3e3dba0d50b1d907a8062bbaca18f88478 (patch) | |
tree | cbac73b3b000eb85971f0f37ab2dfea3334cd05d /plugins/ssh-agent | |
parent | 95a06f3927a286db257dc99791b02caba757fe33 (diff) | |
download | zsh-02d07f3e3dba0d50b1d907a8062bbaca18f88478.tar.gz zsh-02d07f3e3dba0d50b1d907a8062bbaca18f88478.tar.bz2 zsh-02d07f3e3dba0d50b1d907a8062bbaca18f88478.zip |
fix: use `$USERNAME` guaranteed to always be defined in zsh
Fixes #9701
Diffstat (limited to 'plugins/ssh-agent')
-rw-r--r-- | plugins/ssh-agent/ssh-agent.plugin.zsh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index 430647135..d45406f63 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -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" |