1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-10-01 08:21:17 +02:00
zsh/Functions/Prompts/prompt_zefram_setup
1999-11-18 15:15:27 +00:00

18 lines
462 B
Plaintext

function prompt_zefram_precmd {
local exitstatus=$?
psvar=(SIG)
[[ $exitstatus -gt 128 ]] && psvar[1]=SIG$signals[$exitstatus-127]
[[ $psvar[1] = SIG ]] && psvar[1]=$exitstatus
jobs % >/dev/null 2>&1 && psvar[2]=
}
function prompt_zefram_setup {
PS1='[%(2L.%L/.)'$ZSH_VERSION']%(?..%B{%v}%b)%n%(2v.%B@%b.@)%m:%B%~%b%(!.#.>) '
PS2='%(4_:... :)%3_> '
precmd () { prompt_zefram_precmd; setopt promptsubst }
preexec () { }
}
prompt_zefram_setup "$@"