Created
January 27, 2021 18:52
-
-
Save OrangeTide/d719599e9b04a73d5080053c9e754c63 to your computer and use it in GitHub Desktop.
Add a cool π prompt to your shell (for bash)
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
# Add this snippet to your .bashrc instead of your normal prompt (PS1) setting. | |
# Customize the line below further with your favorite smilies | |
# π π π π’ π π | |
PS1='$(test $? -eq 0 && echo "\[\033[0;32m\]π" || echo "\[\033[0;1;31m\]π’")\[\033[0m\] \W\$ ' | |
# Set window title | |
case "$TERM" in | |
xterm*) | |
# see also man xterm(1) - "Window and Icon Titles" | |
PS1='\[\033]2;\W\a\]'$PS1 | |
;; | |
screen*) | |
# see also man screen(1) - "TITLES (naming windows)" | |
PS1='\[\033k\W\033\\\]'$PS1 | |
;; | |
esac | |
## Fin! ## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This the most important tool in DevOps.