gitconfig: add br alias to branch; prompt: remove cabal sandbox

This commit is contained in:
2018-08-09 10:32:30 +02:00
parent c3cfef62ff
commit de054b27af
2 changed files with 4 additions and 15 deletions

View File

@@ -1,4 +1,5 @@
[alias] [alias]
br = branch
ca = commit -a ca = commit -a
cam = commit -am cam = commit -am
changes = diff --name-status -r changes = diff --name-status -r

12
zshrc
View File

@@ -116,20 +116,8 @@ function rprompt-git-current-branch {
echo "on %{$fg[white]%}$color$name$action%f%b %{$reset_color%}" 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='`rprompt-git-current-branch`'
RPROMPT+="%{$fg[white]%}in %{$fg[yellow]%}%~%{$reset_color%}" RPROMPT+="%{$fg[white]%}in %{$fg[yellow]%}%~%{$reset_color%}"
RPROMPT+='`cabal_sandbox_info`'
extract(){ extract(){
if [ -f $1 ] ; then if [ -f $1 ] ; then