Last active
July 30, 2020 19:57
-
-
Save ramazanpolat/447484998e9f21e734fa27ce61d8ad50 to your computer and use it in GitHub Desktop.
Colored bash prompt. When exitcode OK it is happy :) Otherwise it is sad :(
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PS1='\[\e[33m\]\u@\h:\w\[\e[0m\] $(if [[ $? == 0 ]]; then echo "\[$(tput setaf 2)\]:) "; else echo "\[\e[31m\]:( "; fi)\[$(tput sgr0)\]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment