From ce338b215c3494e9fa538b13c8f8a5a73544e765 Mon Sep 17 00:00:00 2001 From: Salt Date: Wed, 15 Jan 2020 20:21:04 +0000 Subject: [PATCH] .profile: More robust SSH detection --- .profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.profile b/.profile index 40866dbc..15f68d94 100755 --- a/.profile +++ b/.profile @@ -283,7 +283,7 @@ _ps1bash() { # Add hostname prefix in SSH sessions unset prefix # Alert if in an SSH session - if [ "$SSH_CLIENT" ]; then + if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then prefix="${fg_bold}${fg_red}ssh${r}${fg_red}:${r}${prefix}" fi # Change PWD color depending on the shell