fix display of return code in prompt
This commit is contained in:
@@ -311,13 +311,13 @@ set_prompt()
|
|||||||
# Add exit status of the last command.
|
# Add exit status of the last command.
|
||||||
# If it was successful, print a green check mark. Otherwise, print a red X.
|
# If it was successful, print a green check mark. Otherwise, print a red X.
|
||||||
if [[ $Last_Command == 0 ]]; then
|
if [[ $Last_Command == 0 ]]; then
|
||||||
PS1+="\[${_ok_fg}${_bar_bg}\] [ \$Last_Command "
|
PS1+="\[${_ok_fg}${_bar_bg}\] [ $Last_Command "
|
||||||
PS1+="\[${_ok_mark}${_bar_bg}\]${Checkmark} "
|
PS1+="\[${_ok_mark}${_bar_bg}\]${Checkmark} "
|
||||||
# Add the elapsed time, then close the status section and return to bar bg.
|
# Add the elapsed time, then close the status section and return to bar bg.
|
||||||
timer_stop
|
timer_stop
|
||||||
PS1+="($timer_show)\[${_ok_fg}${_bar_bg}\] ] "
|
PS1+="($timer_show)\[${_ok_fg}${_bar_bg}\] ] "
|
||||||
else
|
else
|
||||||
PS1+="\[${_err_fg}${_err_bg}\] [ \$Last_Command "
|
PS1+="\[${_err_fg}${_err_bg}\] [ $Last_Command "
|
||||||
PS1+="\[${_err_mark}${_err_bg}\]${FancyX} "
|
PS1+="\[${_err_mark}${_err_bg}\]${FancyX} "
|
||||||
timer_stop
|
timer_stop
|
||||||
PS1+="($timer_show)\[${_err_fg}${_err_bg}\] ] "
|
PS1+="($timer_show)\[${_err_fg}${_err_bg}\] ] "
|
||||||
|
|||||||
Reference in New Issue
Block a user