Skip to content

Instantly share code, notes, and snippets.

@eval
Created November 4, 2014 11:48
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 eval/5a1432a87887ac9c51a9 to your computer and use it in GitHub Desktop.
Save eval/5a1432a87887ac9c51a9 to your computer and use it in GitHub Desktop.
alias
alias alert='say -v "$([ $? = 0 ] && echo Good News || echo Bad News)" done'
@matthijsgroen
Copy link

For fish:

function alert
  set -l state $status
  say -v ""(if test $state -eq 0; echo Good; else; echo Bad; end)" News" done
  return $state
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment