Set hostname in prompt if through SSH

This commit is contained in:
Andrew R. M 2024-01-04 15:23:08 +00:00
parent 7d67ff0662
commit 8dda8c7fbc

View File

@ -11,7 +11,7 @@ cyan="\[\033[1;36m\]"
no_color="\[\033[0m\]"
export PS1="${green}\$${no_color} "
if [ "${HOSTNAME}" != "crypt" ] && [ "${HOSTNAME}" != "tomb" ]; then
if [ "${HOSTNAME}" != "crypt" ] && [ "${HOSTNAME}" != "tomb" ] || [ "${SSH_TTY}" != "" ]; then
PS1="${PS1}${blue}${HOSTNAME} ${PS1}"
fi