mlangenberg (owner)

Revisions

gist: 9695 Download_button fork
public
Public Clone URL: git://gist.github.com/9695.git
Embed All Files: show embed
.profile.sh #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function parse_git_branch {
ref=$(git-symbolic-ref HEAD 2> /dev/null) || return
echo "("${ref#refs/heads/}")"
}
 
function proml {
  local LIGHT_GRAY="\[\033[0;37m\]"
  case $TERM in
    xterm*)
    TITLEBAR='\[\033]0;\u@\h:\w\007\]'
    ;;
    *)
    TITLEBAR=""
    ;;
  esac
 
PS1="${TITLEBAR}\
\h:\w$LIGHT_GREEN\$(parse_git_branch)$LIGHT_GRAY\
\$ "
PS2='> '
PS4='+ '
}
proml