dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 633b035f73821da715faad48f50c3599ac9f048c
parent ccd207aaf5c0b985a7ee04c3a0bccf8b05a8ed6d
Author: Anders Damsgaard Christensen <adc@geo.au.dk>
Date:   Mon,  9 Jan 2017 14:17:06 -0800

show return status of previous command, change prompt symbol according to root/nonroot

Diffstat:
M.zshrc | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/.zshrc b/.zshrc @@ -16,14 +16,16 @@ promptinit colors # check for background jobs -local bg_jobs="%(1j.%{$fg[yellow]%}%j%{$reset_color%}%{$fg[red]%}z%{$reset_color%}.)" +local bg_jobs="%(1j.%{$fg[yellow]%}%j%{$reset_color%}%{$fg[red]%}z %{$reset_color%}.)" +local return_status="%{$fg[red]%}%(?..!)%{$reset_color%}" +local prompt_root="%(!.%{$fg_bold[red]%}#.%{$fg[green]%}$)%{$reset_color%}" PROMPT=" -${bg_jobs}%{$fg[red]%} » %{$reset_color%}" +${bg_jobs}%{$fg[red]%}${prompt_root} %{$reset_color%}" #PROMPT='%B%m%~%b$(git_super_status) %# ' #PROMPT=' #%b$(git_super_status) %{$fg[red]%}»%{$reset_color%} ' -RPROMPT='%B%{$fg[cyan]%}%~%{$reset_color%} $(git_super_status) %n@%m' +RPROMPT='${return_status} %B%{$fg[cyan]%}%~%{$reset_color%} $(git_super_status) %n@%m' setopt AUTO_CD setopt CORRECT