Separating the first part of a list and the `alert` part with && (or any of the doubled control operators) will result the second character to be printed in the body of the message. Adding the asterisk after the [;&|] bracket expression fixes it.
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]*\s*alert$//'\'')"'
Bug #1953151
Separating the first part of a list and the `alert` part with && (or any of the doubled control operators) will result the second character to be printed in the body of the message. Adding the asterisk after the [;&|] bracket expression fixes it.
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^ \s*[0-9] \+\s*// ;s/[;&| ]*\s*alert$ //'\'') "'
Bug #1953151