summary refs log tree commit diff
path: root/Functions/Prompts/prompt_zefram_setup
diff options
context:
space:
mode:
Diffstat (limited to 'Functions/Prompts/prompt_zefram_setup')
-rw-r--r--Functions/Prompts/prompt_zefram_setup17
1 files changed, 17 insertions, 0 deletions
diff --git a/Functions/Prompts/prompt_zefram_setup b/Functions/Prompts/prompt_zefram_setup
new file mode 100644
index 000000000..3e6d34840
--- /dev/null
+++ b/Functions/Prompts/prompt_zefram_setup
@@ -0,0 +1,17 @@
+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 "$@"