Skip to content

Instantly share code, notes, and snippets.

@djnugent
Last active May 13, 2019 04:51
Show Gist options
  • Save djnugent/e3c8c656b16efb1b641244c3c8b39d99 to your computer and use it in GitHub Desktop.
Save djnugent/e3c8c656b16efb1b641244c3c8b39d99 to your computer and use it in GitHub Desktop.
PS1 .bashrc
case $HOSTNAME in
(dbox) prompt_clr=71;;
(docker) prompt_clr=110;;
(*) prompt_clr=183;;
esac
if [ "$color_prompt" = yes ]; then
PS1="\[\033[38;5;${prompt_clr}m\]\[\033[48;5;238m\] \u \[$(tput sgr0)\]\[\033[38;5;255m\]\[\033[48;5;${prompt_clr}m\] \W \[$(tput sgr0)\] "
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment