bashpowerlinebash-it

How can I show colored hostname on the prompt in Powerline-Plain [Bash-it] theme?


I would like to show hostname at the beginning of the prompt in Powerline-Plain [Bash-it] theme.

Something like: MYHOSTNAME root /var/www

This is the default looks: root /var/www

and I'd like to assign to it a different random and fixed color for each different hostname.


Solution

  • Just overwrite the POWERLINE_PROMPT variable in your .bashrc file and add hostname like this:

    export POWERLINE_PROMPT=${POWERLINE_PROMPT:="hostname user_info scm python_venv ruby node cwd"}