summaryrefslogtreecommitdiffstats
path: root/.zsh/rc/15prompt
diff options
context:
space:
mode:
Diffstat (limited to '.zsh/rc/15prompt')
-rw-r--r--.zsh/rc/15prompt7
1 files changed, 3 insertions, 4 deletions
diff --git a/.zsh/rc/15prompt b/.zsh/rc/15prompt
index 5eb75ec..e4e062f 100644
--- a/.zsh/rc/15prompt
+++ b/.zsh/rc/15prompt
@@ -19,8 +19,7 @@ prompt_eof_setup() {
prompt_eof_setup "$@"
-
-
+EXITCODE="%(?..(%?%1) )"
# function to show the current git branch in prompt
parse_git_branch() {
@@ -35,9 +34,9 @@ parse_git_branch() {
precmd () {
# this has to be on the edge or you have some spaces in the prompt
# if you have any workaround please tell
-PS1="${fg_light_red}$USERNAME${fg_no_colour}@${fg_light_green}%m${fg_no_colour} \
+PROMPT="${fg_light_red}$USERNAME${fg_no_colour}@${fg_light_green}%m${fg_no_colour} \
- ${fg_light_blue}%~${fg_no_colour} ${fg_purple}$(parse_git_branch)${fg_no_colour}
-[${fg_cyan}%*${fg_no_colour}] > "
+[${fg_cyan}%*${fg_no_colour}] ${fg_red}$EXITCODE${fg_no_colour}> "
}
## Spelling prompt