Skip to content

Instantly share code, notes, and snippets.

@andfaulkner
Created July 30, 2015 06:15
Show Gist options
  • Save andfaulkner/58c34fdab23161e96889 to your computer and use it in GitHub Desktop.
Save andfaulkner/58c34fdab23161e96889 to your computer and use it in GitHub Desktop.
Bash npm utils
#find version of globally installed package
alias npmpv="npm list -g | grep"
#add new alias to bashrc, also make immediately available
function newalias {
echo "" >> ~/.bashrc
echo "" >> ~/.bashrc
echo 'alias' ${1}='"'${2}'"' >> ~/.bashrc
$(echo 'alias' ${1}'='${2})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment