diff --git a/templates/bashrc.j2 b/templates/bashrc.j2 index 0e0fb15..38f1851 100644 --- a/templates/bashrc.j2 +++ b/templates/bashrc.j2 @@ -63,7 +63,9 @@ if [ -n "$force_color_prompt" ]; then fi if [ "$color_prompt" = yes ]; then - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\] \$ ' + color_prompt_cols=('1;35' '0;32' '0;33' '0;34' '0;35' '0;36' '0;37' '1;31' '1;32' '1;33' '1;34' '0;31' '1;36' '1;37') + color_prompt_col='\[\e[${color_prompt_cols[$(echo "${HOSTNAME}" | md5sum | sed s/[abcdef]*// | head -c 1)]}m\]' + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@'$color_prompt_col'\h\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\] \$ ' else PS1='${debian_chroot:+($debian_chroot)}\u@\h \w \$ ' fi