case `hostname` in
prd*) # Production - red
PS1='\[\033[1;31m\][\t][\u@\h:$PWD]\[\033[0;37m\]\n\$ '
;;
dev*) # Development - light green
PS1='\[\033[1;32m\][\t][\u@\h:$PWD]\[\033[0;37m\]\n\$ '
;;
bcp*) # BCP - light purple
PS1='\[\033[1;35m\][\t][\u@\h:$PWD]\[\033[0;37m\]\n\$ '
;;
tst*) # Test - yellow
PS1='\[\033[1;33m\][\t][\u@\h:$PWD]\[\033[0;37m\]\n\$ '
;;
*) # Ouch - light grey
PS1='\[\033[0;37m\][\t][\u@\h:$PWD]\[\033[0;37m\]\n\$ '
;;
esac
export PS1
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter