aboutsummaryrefslogtreecommitdiffstats
path: root/hyperterm/themes/joy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'hyperterm/themes/joy.sh')
-rw-r--r--hyperterm/themes/joy.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/hyperterm/themes/joy.sh b/hyperterm/themes/joy.sh
index 0f5e8ee..54e29f6 100644
--- a/hyperterm/themes/joy.sh
+++ b/hyperterm/themes/joy.sh
@@ -1,11 +1,18 @@
#!/bin/bash
+# shellcheck disable=SC2034,SC2154
unset joy
# Import colors
_colors_bash "$@"
-: "${joy:=\n\
+PROMPT_COMMAND='
+ last_status=$?
+ ps1_status="$(exitstatus "$last_status")"
+ ps1_git="$(__prompt_git)"
+'
+
+joy="\n\
\[${BOLD}${CYAN}\]\342\224\214\342\224\200[\
\[${BOLD}${YELLOW}\]\u\
\[${BOLD}${CYAN}\]@\
@@ -15,15 +22,15 @@ _colors_bash "$@"
\[${RESET}\]\w\
\[${BOLD}${CYAN}\]]\
\342\224\200\
-\$(exitstatus)\
+\${ps1_status}\
\[${BOLD}${CYAN}\]\
\342\224\200\
-\$(__prompt_git)\
+\${ps1_git}\
\[${BOLD}${CYAN}\]\342\224\200[\
\[${RESET}\]\t\
\[${BOLD}${CYAN}\]]\n\
\[${BOLD}${CYAN}\]\342\224\224\342\224\200\342\224\200\342\225\274\
-\[${BOLD}${GREEN}\] $SYMBOL \[$RESET\]}"
+\[${BOLD}${GREEN}\] $SYMBOL \[$RESET\]"
unset _psi
: "${_psi:=\[${BOLD}${CYAN}\]=>\[$RESET\] }"