[Bug 616028] Re: add an "alert" alias, which can optionally be added after long running commands
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
[Bug 616028] Re: add an "alert" alias, which can optionally be added after long running commands
And forgot the link: http://support.orions2.org/projects/cnotify -- 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
[Bug 616028] Re: add an "alert" alias, which can optionally be added after long running commands
I was pointed here by a commenter on my blog, I've just written something similar but using Jabber for notifications to make it work on a number of servers instead of my desktop alone. -- 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
Re: [Bug 616028] Re: add an "alert" alias, which can optionally be added after long running commands
Awesome, thanks, Martin! -- 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 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 616028] Re: add an "alert" alias, which can optionally be added after long running commands
Dustin, done: http://bazaar.launchpad.net/~ubuntu-core-dev/ubuntu- seeds/platform.oneiric/revision/1616 Thanks for landing this! -- 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 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 616028] Re: add an "alert" alias, which can optionally be added after long running commands
Martin, Do you think we could add libnotify-bin to the ubuntu desktop seeds, such that we have the notify-send command available for the "alert" alias, which is in the bash profile now? Dustin -- 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 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 616028] Re: add an "alert" alias, which can optionally be added after long running commands
I definitely agree with nstenz that a comment specifying the 'libnotify- bin' pre-requisite. In my opinion, having such an alias and discovering that it does not work out-of-the-box after the long command has been completed without notification is annoying. -- 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 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 616028] Re: add an "alert" alias, which can optionally be added after long running commands
The first time you try to use 'alert', command-not-found tells you that you need to install libnotify-bin, right? -- add an "alert" alias, which can optionally be added after long running commands https://bugs.launchpad.net/bugs/616028 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 616028] Re: add an "alert" alias, which can optionally be added after long running commands
The default .bashrc should also have a comment added stating that the user has to install libnotify-bin, which is not installed by default in Maverick, to get the notify-send binary; otherwise the pop-up notification won't work. Having libnotify-bin in the default install would take care of it too, but notify-send doesn't seem to be looked upon too highly by the folks in charge of notifications in Ubuntu anyway. -- add an "alert" alias, which can optionally be added after long running commands https://bugs.launchpad.net/bugs/616028 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 616028] Re: add an "alert" alias, which can optionally be added after long running commands
This bug was fixed in the package bash - 4.1-2ubuntu4 --- bash (4.1-2ubuntu4) maverick; urgency=low * debian/skel.bashrc: add 'alert' alias, LP: #616028 -- Dustin KirklandTue, 10 Aug 2010 15:35:08 -0400 ** Changed in: bash (Ubuntu) Status: Fix Committed => Fix Released -- add an "alert" alias, which can optionally be added after long running commands https://bugs.launchpad.net/bugs/616028 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 616028] Re: add an "alert" alias, which can optionally be added after long running commands
For the moment, commited as: 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$//'\'')"' with generic icon 'terminal' so that it should be happier on K/Xubuntu with reduced icons sets and the lower priority to not be unnecessarily noisy. Long-term there are going to be better solutions(tm). ** Changed in: bash (Ubuntu) Status: In Progress => Fix Committed -- add an "alert" alias, which can optionally be added after long running commands https://bugs.launchpad.net/bugs/616028 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs