Skip to content

Instantly share code, notes, and snippets.

@izikeros
Last active March 14, 2024 09:53
Show Gist options
  • Save izikeros/648b8e171534c6c2fb27865b93ed7586 to your computer and use it in GitHub Desktop.
Save izikeros/648b8e171534c6c2fb27865b93ed7586 to your computer and use it in GitHub Desktop.
[shell colors] definition of colors to be used for printing coloured messages #bash
# Text color variables
# Sample usage: $bldblu Respository $txtrst is $bldred not clean $txtrst"
txtund=$(tput sgr 0 1) # Underline
txtbld=$(tput bold) # Bold
bldred=${txtbld}$(tput setaf 1) # red
bldblu=${txtbld}$(tput setaf 4) # blue
bldwht=${txtbld}$(tput setaf 7) # white
# Reset
txtrst=$(tput sgr0)
# Coloured bullet for given feedback type.
# Sample usage: echo $warn File not found.
info=${bldwht}*${txtrst}
pass=${bldblu}*${txtrst}
warn=${bldred}*${txtrst}
ques=${bldblu}?${txtrst}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment