diff --git a/gitconfig b/gitconfig index 3905153..12ac647 100644 --- a/gitconfig +++ b/gitconfig @@ -1,4 +1,5 @@ [alias] + br = branch ca = commit -a cam = commit -am changes = diff --name-status -r diff --git a/zshrc b/zshrc index ac6c4b5..11d9c60 100644 --- a/zshrc +++ b/zshrc @@ -96,10 +96,10 @@ function rprompt-git-current-branch { if [[ -z $name ]]; then return fi - + gitdir=`git rev-parse --git-dir 2> /dev/null` action=`VCS_INFO_git_getaction "$gitdir"` && action="($action)" - + st=`git status 2> /dev/null` if [[ -n `echo "$st" | grep "ahead of"` ]]; then color=%F{white} @@ -112,24 +112,12 @@ function rprompt-git-current-branch { else color=%B%F{blue} fi - + echo "on %{$fg[white]%}$color$name$action%f%b %{$reset_color%}" } -function cabal_sandbox_info() { - cabal_files=(*.cabal(N)) - if [ $#cabal_files -gt 0 ]; then - if [ -f cabal.sandbox.config ]; then - echo "%{$fg[white]%} is %{$fg[green]%}sandboxed%{$reset_color%}" - else - echo "%{$fg[white]%} is %{$fg[red]%}not sandboxed%{$reset_color%}" - fi - fi -} - RPROMPT='`rprompt-git-current-branch`' RPROMPT+="%{$fg[white]%}in %{$fg[yellow]%}%~%{$reset_color%}" -RPROMPT+='`cabal_sandbox_info`' extract(){ if [ -f $1 ] ; then