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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/616028

Title:
  add an "alert" alias, which can optionally be added after long running
  commands

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/616028/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to