typeset -ga preexec_functions
typeset -ga precmd_functions
typeset -ga chpwd_functions
+psvar=()
+
[ -w $zsh_cache ] && HISTFILE=$zsh_cache/history
--- /dev/null
+#! /usr/bin/zsh
+
+
+parse_exitcode() {
+ EX=`print -P %?`
+ psvar[1]=$EX
+
+ if [[ $EX -ge 128 ]]
+ then
+ psvar[1]="${signals[${EX}-127]}"
+ fi
+}
+
+precmd_functions+='parse_exitcode'
git_parse() {
- psvar=()
local git_dir ref base_dir sub_dir action branch
git_dir=$(git rev-parse --git-dir 2> /dev/null) || return
_machine="${C_BRED}%m${C_NO}"
_hour="${C_BCYAN}[%D{%H:%M}]${C_NO}"
-_exitcode="%(?::${C_BRED}[ %? ]${C_NO}
+_exitcode="%(?::${C_BRED}[ %1v ]${C_NO}
)$(true)"
_action="%(3v,%3v%,)"