Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Colours
- txtgrn='\[\e[0;32m\]' # Green
- txtylw='\[\e[0;33m\]' # Yellow
- txtblu='\[\e[0;34m\]' # Blue
- txtpur='\[\e[0;35m\]' # Purple
- txtcyn='\[\e[0;36m\]' # Cyan
- txtwht='\[\e[0;37m\]' # White
- bldblk='\[\e[1;30m\]' # Black - Bold
- bldred='\[\e[1;31m\]' # Red - Bold
- bldgrn='\[\e[1;32m\]' # Green - Bold
- bldylw='\[\e[1;33m\]' # Yellow - Bold
- bldblu='\[\e[1;34m\]' # Blue - Bold
- bldpur='\[\e[1;35m\]' # Purple - Bold
- bldcyn='\[\e[1;36m\]' # Cyan - Bold
- bldwht='\[\e[1;37m\]' # White - Bold
- txtrst='\[\e[0m\]' # Text Reset
- # Function called before prompt
- function pre_prompt_print(){
- # Git branch
- GIT_BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[git:\1]/'`
- }
- PROMPT_COMMAND=pre_prompt_print
- PS1="$bldgrn\u$txtrst@$bldpur\h$txtrst:$bldblu\w$txtrst $bldpur\${GIT_BRANCH}$txtrst\n$bldylw\!$txtrst> "
- # Git aliases
- alias gita='git add'
- alias gitc='git commit -m'
- alias gits='git status -s'
- alias gitl='git log --oneline --color'
- alias gitb='git branch --color'
- alias gitu='git reset --HEAD^'
- # Other Aliases
- alias df='df -h'
- alias ll='ls -lh'
- alias pud='pushd'
- alias pod='popd'
- # Load RVM into a shell session *as a function*
- [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
- # Add RVM to PATH for scripting
- PATH=$PATH:$HOME/.rvm/bin
Add Comment
Please, Sign In to add comment