Bash: Unify color output. Prompt refactoring.

This commit is contained in:
Artem Sapegin
2012-12-12 16:52:29 +04:00
parent 3d02d94960
commit 3ccdb8b7e2
3 changed files with 52 additions and 75 deletions

View File

@ -37,6 +37,20 @@ PATH="/usr/local/bin:$PATH"
command -v brew >/dev/null 2>&1 && PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"
export PATH
# Colors
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)"
GRAY="$(tput setaf 8)"
BOLD="$(tput bold)"
UNDERLINE="$(tput sgr 0 1)"
INVERT="$(tput sgr 1 0)"
NOCOLOR="$(tput sgr0)"
# Load prompt and aliases
for file in ~/dotfiles/includes/{bash_prompt,bash_aliases,bash_functions}; do
[ -r "$file.bash" ] && source "$file.bash"