aboutsummaryrefslogtreecommitdiffstats
path: root/hyperterm/themes/default.sh
diff options
context:
space:
mode:
Diffstat (limited to 'hyperterm/themes/default.sh')
-rw-r--r--hyperterm/themes/default.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/hyperterm/themes/default.sh b/hyperterm/themes/default.sh
index 8d2f026..27512bd 100644
--- a/hyperterm/themes/default.sh
+++ b/hyperterm/themes/default.sh
@@ -1,11 +1,17 @@
#!/bin/bash
-# shellcheck disable=SC1117
+# shellcheck disable=SC1117,SC2034,SC2154
unset default
# Import colors
_colors_bash "$@"
+PROMPT_COMMAND='
+ last_status=$?
+ ps1_status="$(exitstatus "$last_status")"
+ ps1_git="$(__prompt_git)"
+'
+
default=("\n\
\[$RESET\]\
\[${BOLD}${YELLOW}\][ \u \
@@ -13,11 +19,9 @@ default=("\n\
\[${BOLD}${RED}\] \D{%I:%M%p} ]\n\
\[$RESET\]\
\[${BOLD}${WHITE}\][\$PWD]\[$RESET\] \
-\$(exitstatus)\[$RESET\]\
-\$(__prompt_git)\
+\${ps1_status}\[$RESET\]\
+\${ps1_git}\
\n\[${BOLD}${GREEN}\]$SYMBOL \[$RESET\]")
-export default
-
unset _psi
: "${_psi:=\[${BOLD}${CYAN}\]=>\[$RESET\] }"