.profile: More robust SSH detection
This commit is contained in:
parent
3f9a4e2827
commit
ce338b215c
2
.profile
2
.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
|
||||
|
Loading…
Reference in New Issue
Block a user