Set hostname in prompt if through SSH

This commit is contained in:
Andrew R. M 2025-04-04 17:42:35 +00:00
parent a9da299120
commit 9733251bfc

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