Last active
August 29, 2015 14:07
-
-
Save VGonPa/7662c89ce11e18df6f00 to your computer and use it in GitHub Desktop.
A pretty format for your bash prompt
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
# Prompt Colors | |
BGREEN='\[\033[1;32m\]' | |
GREEN='\[\033[0;32m\]' | |
BRED='\[\033[1;31m\]' | |
RED='\[\033[0;31m\]' | |
BYELLOW='\[\033[1;33m\]' | |
YELLOW='\[\033[0;33m\]' | |
BBLUE='\[\033[1;34m\]' | |
BLUE='\[\033[0;34m\]' | |
BBLACK='\[\033[1;30m\]' | |
BLACK='\[\033[0;30m\]' | |
BPURPLE='\[\033[1;35m\]' | |
PURPLE='\[\033[0;35m\]' | |
BCYAN='\[\033[1;36m\]' | |
CYAN='\[\033[0;36m\]' | |
BWHITE='\[\033[1;37m\]' | |
WHITE='\[\033[0;37m\]' | |
NORMAL='\[\033[00m\]' | |
# Improved PS1 by Víctor González: | |
PROMPT_COMMAND='DIR=`pwd|sed -e "s!$HOME!~!"`; if [ ${#DIR} -gt 30 ]; then CurDir=${DIR:0:12}...${DIR:${#DIR}-15}; else CurDir=$DIR; fi' | |
CURDIR="[\$CurDir]\$ " | |
PS1="${BGREEN}\u${BYELLOW}@${BYELLOW}\h:${BBLUE}${CURDIR}${NORMAL}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More possible colours: