When doing updates or newinstalling of packages it would be useful if emerge could do anything optional on exit like playing a sound to make you aware that it failed emerging or it has finished What do you think?
The exit status already provides the required functionality. You can create a wrapper script if you want like this (save it as /usr/local/bin/emerge or something): #!/usr/bin/env bash /usr/lib/portage/bin/emerge && aplay success.wav || aplay failure.wav
Oops, forgot to pass the args to emerge... #!/usr/bin/env bash /usr/lib/portage/bin/emerge "$@" && aplay success.wav || aplay failure.wav
But that will make emerge always playing sounds on exit even when I make emerge -s foobar or emerge -pv world which might not be preferable all times
(In reply to comment #3) > But that will make emerge always playing sounds on exit even when I make emerge > -s foobar or emerge -pv world which might not be preferable all times Call the script something different (besides emerge) and only use it when you want sound.
for your .bashrc: semerge() { emerge "$@" && aplay success.wav || aplay failure.wav ; }