Created
May 30, 2017 09:14
-
-
Save usefulthink/54258bee49472b175e7c7c37cbaa5ad1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add this to your .bashrc to add `npm bin` dynamically to your path (works with bash > 4): | |
function command_not_found_handle() { | |
npmBinDir=`npm bin` | |
if [ -x "$npmBinDir/$1" ] ; then | |
"$npmBinDir/"$@ | |
else | |
echo "$1: command not found" >&2 | |
( exit 127 ) | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment