summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2025-12-10 17:06:15 -0500
committerJacob McDonnell <jacob@jacobmcdonnell.com>2025-12-10 17:06:15 -0500
commit2fc45614275be845ddbdc8122611c4553fc0845b (patch)
tree31996b44eb63fbee1584035a153ecd5b16e1349c /.config
parentdd1618a06253bbef2caa3c349d0527917948fecf (diff)
Error code in prompt only on error
Diffstat (limited to '.config')
-rw-r--r--.config/shells/zsh/.zshrc2
1 files changed, 1 insertions, 1 deletions
diff --git a/.config/shells/zsh/.zshrc b/.config/shells/zsh/.zshrc
index cbf682b..aef99aa 100644
--- a/.config/shells/zsh/.zshrc
+++ b/.config/shells/zsh/.zshrc
@@ -19,7 +19,7 @@ SAVEHIST=100
HISTSIZE=5000
setopt prompt_subst
autoload -U colors && colors
-PROMPT='%{$fg_bold[$shColor]%}$comSym%{$reset_color%} in %{$fg_bold[$shColor]%}%c%{$reset_color%}
+PROMPT='%{$fg_bold[$shColor]%}$comSym%{$reset_color%} in %{$fg_bold[$shColor]%}%c%{$reset_color%} $(ret=$?; [[ $ret != 0 ]] && printf "%s[%d]%s " %{$fg_bold[red]%} $ret %{$reset_color%})
→ '
source $ZSH/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source $ZSH/plugins/fzf-tab/fzf-tab.zsh