prompt, that shows hostname on hosts other than main

This commit is contained in:
Sebastian Moser
2023-11-01 17:58:22 +01:00
parent c596e2b77d
commit 3a7e3d21e2

View File

@@ -73,7 +73,12 @@
export TERM="xterm-color"
# my prompt
export PS1="\[\033[01;34m\]\W\[\033[00m\]\[\033[01;32m\]\[\033[00m\] "
if [[ "$(hostname)" == "main" ]]
then
export PS1="\[\033[01;34m\]\W\[\033[00m\]\[\033[01;32m\]\[\033[00m\] "
else
export PS1="\033[1;32m$(hostname) \[\033[01;34m\]\W\[\033[00m\]\[\033[01;32m\]\[\033[00m\] "
fi
# so that programms i spawn from my shell don't have so high cpu priority