mirror of
https://github.com/Cornelicorn/bullet-train.zsh.git
synced 2025-12-06 11:50:38 +01:00
Add an option to show extended exit code/status information.
Add a user selectable option 'BULLETTRAIN_EXIT_SHOW' to show the actual exit status code ($RETVAL) along with the graphical indicator.
This commit is contained in:
@@ -252,7 +252,8 @@ prompt_time() {
|
||||
prompt_status() {
|
||||
local symbols
|
||||
symbols=()
|
||||
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘"
|
||||
[[ $RETVAL -ne 0 && $BULLETTRAIN_EXIT_SHOW != true ]] && symbols+="%{%F{red}%}✘ "
|
||||
[[ $RETVAL -ne 0 && $BULLETTRAIN_EXIT_SHOW == true ]] && symbols+="%{%F{red}%}✘ $RETVAL"
|
||||
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡"
|
||||
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user