As others have already mentioned, there is no need to display so many messages in a message. Below is the Bash hint I'm using:

As you can see, the exit value at the prompt becomes RED when it is nonzero, so you can easily find out that the command just worked. And if the command is killed by a signal, the number and name of the signal will also be displayed. In the above screenshot, 130:2:INT means the last command completed with 130 (= 128 + 2), and it was killed by signal 2 ( SIGINT ).
Below is the code in bashrc :
function _PS1_command() { local lastexit=$? local ESC=$'\033' (( lastexit )) && g_PS1_Qcolor="$ESC[1;31m" || g_PS1_Qcolor= g_PS1_signal= if (( lastexit > 128 )) && kill -l $(( lastexit - 128 )) > /dev/null then (( g_PS1_signal = lastexit - 128 )) g_PS1_signal="$g_PS1_signal:$( kill -l $g_PS1_signal )" fi return $lastexit } PROMPT_COMMAND=_PS1_command PS1='[\w $g_PS1_Qcolor$?${g_PS1_signal:+:}$g_PS1_signal\e[0m] # '
pynexj
source share