-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash_profile
More file actions
18 lines (18 loc) · 819 Bytes
/
bash_profile
File metadata and controls
18 lines (18 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
export PATH=$PATH:/Users/srajendran/GoogleDrive/SCRIPTS/
function color_my_prompt {
local __user_and_host="\[\033[01;32m\]\u@\h"
local __cur_location="\[\033[01;34m\]\w"
local __git_branch_color="\[\033[31m\]"
#local __git_branch="\`ruby -e \"print (%x{git branch 2> /dev/null}.grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1) ')\"\`"
local __git_branch='`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`'
local __prompt_tail="\[\033[35m\]$"
local __last_color="\[\033[00m\]"
export PS1="$__user_and_host $__cur_location $__git_branch_color$__git_branch$__prompt_tail$__last_color\n# "
}
color_my_prompt
alias gb='git branch -v'
alias gl='git log'
alias gl1='git log --oneline'
alias gr='git remote -vvv'
alias gck='git checkout --'
alias gs='git status'