定制性感Bash提示-Git分支/状态
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了定制性感Bash提示-Git分支/状态相关的知识,希望对你有一定的参考价值。
customized version of Sexy Bash Prompt
# Sexy Bash Prompt, inspired by "Extravagant Zsh Prompt" # Screenshot: http://img.gf3.ca/d54942f474256ec26a49893681c49b5a.png # A big thanks to amethyst on Freenode if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then export TERM=gnome-256color elif infocmp xterm-256color >/dev/null 2>&1; then export TERM=xterm-256color fi if tput setaf 1 &> /dev/null; then tput sgr0 if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then MAGENTA=$(tput setaf 9) ORANGE=$(tput setaf 172) GREEN=$(tput setaf 190) PURPLE=$(tput setaf 141) WHITE=$(tput setaf 256) else MAGENTA=$(tput setaf 5) ORANGE=$(tput setaf 4) GREEN=$(tput setaf 2) PURPLE=$(tput setaf 1) WHITE=$(tput setaf 7) fi BOLD=$(tput bold) RESET=$(tput sgr0) else MAGENTA="