Skip to content

Instantly share code, notes, and snippets.

@codegoalie
Created May 17, 2011 01:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codegoalie/975690 to your computer and use it in GitHub Desktop.
Save codegoalie/975690 to your computer and use it in GitHub Desktop.
Shell Alert for long running commands
# I didn't write this and I'm not sure where it came from...
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
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$//'\'')"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment