This commit is contained in:
2018-01-23 14:34:39 +01:00
parent 5d794a9235
commit e98c23471b

10
zshrc
View File

@@ -67,7 +67,7 @@ alias tmv="tmux split-window"
alias tmh="tmux split-window -h" alias tmh="tmux split-window -h"
alias tms="tmux select-pane -t" alias tms="tmux select-pane -t"
alias tmk="killall tmux; tmux" alias tmk="killall tmux; tmux"
PROMPT="%{$fg_bold[red]%}%n%{$fg_no_bold[white]%} at %{$fg_bold[green]%}%m%{$fg_no_bold[white]%}"$'\n'"=> " PROMPT="%{$fg[red]%}%n%{$fg[white]%} at %{$fg[green]%}%m%{$fg[white]%}"$'\n'"=> "
expand-or-complete-with-dots(){ expand-or-complete-with-dots(){
echo -n "e[31m.....\e[0m" echo -n "e[31m.....\e[0m"
@@ -120,22 +120,22 @@ function rprompt-git-current-branch {
color=%B%F{blue} color=%B%F{blue}
fi fi
echo "on %{$fg_bold[white]%}$color$name$action%f%b %{$reset_color%}" echo "on %{$fg[white]%}$color$name$action%f%b %{$reset_color%}"
} }
function cabal_sandbox_info() { function cabal_sandbox_info() {
cabal_files=(*.cabal(N)) cabal_files=(*.cabal(N))
if [ $#cabal_files -gt 0 ]; then if [ $#cabal_files -gt 0 ]; then
if [ -f cabal.sandbox.config ]; then if [ -f cabal.sandbox.config ]; then
echo "%{$fg_no_bold[white]%} is %{$fg_bold[green]%}sandboxed%{$reset_color%}" echo "%{$fg[white]%} is %{$fg[green]%}sandboxed%{$reset_color%}"
else else
echo "%{$fg_no_bold[white]%} is %{$fg_bold[red]%}not sandboxed%{$reset_color%}" echo "%{$fg[white]%} is %{$fg[red]%}not sandboxed%{$reset_color%}"
fi fi
fi fi
} }
RPROMPT='`rprompt-git-current-branch`' RPROMPT='`rprompt-git-current-branch`'
RPROMPT+="%{$fg[white]%}in %{$fg_bold[yellow]%}%~%{$reset_color%}" RPROMPT+="%{$fg[white]%}in %{$fg[yellow]%}%~%{$reset_color%}"
RPROMPT+='`cabal_sandbox_info`' RPROMPT+='`cabal_sandbox_info`'
extract(){ extract(){