Skip to content

Instantly share code, notes, and snippets.

@ziadoz
Last active August 26, 2021 21:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ziadoz/e0c73cb6624a72d27dd5 to your computer and use it in GitHub Desktop.
Save ziadoz/e0c73cb6624a72d27dd5 to your computer and use it in GitHub Desktop.
Simple Bash Colours With TPut
# See: http://en.wikipedia.org/wiki/Tput
BOLD="$(tput bold)"
RED="$(tput setaf 1)"
GREEN="$(tput setaf 2)"
YELLOW="$(tput setaf 3)"
BLUE="$(tput setaf 4)"
MAGENTA="$(tput setaf 5)"
CYAN="$(tput setaf 6)"
WHITE="$(tput setaf 7)"
RESET="$(tput sgr0)"
BG_RED="$(tput setab 1)"
BG_GREEN="$(tput setab 2)"
BG_YELLOW="$(tput setab 3)"
BG_BLUE="$(tput setab 4)"
BG_MAGENTA="$(tput setab 5)"
BG_CYAN="$(tput setab 6)"
BG_WHITE="$(tput setab 7)"
export CLICOLOR=1
export PS1="${WHITE}\u@\h${RESET} : ${BLUE}\w${RESET} \n$ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment