Skip to content

Instantly share code, notes, and snippets.

@barn
Last active July 7, 2019 16:49
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 barn/9a9e4a0cf46538404fa0f7ed4af42358 to your computer and use it in GitHub Desktop.
Save barn/9a9e4a0cf46538404fa0f7ed4af42358 to your computer and use it in GitHub Desktop.
#! /bin/zsh
NPM="$(which -a npm 2>/dev/null | grep -m 1 /)"
if [ -n "$NPM" ]
then
npm() {
local rc
"$NPM" $@
rc=$?
osascript -e "display notification \"npm finished, returnd $rc\" with title \"NPMed\""
return $rc
}
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment