mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
add npmbrew plugin
This commit is contained in:
parent
eafd5f3252
commit
3173c9675e
1 changed files with 11 additions and 0 deletions
11
plugins/npmbrew/npmbrew.plugin.zsh
Normal file
11
plugins/npmbrew/npmbrew.plugin.zsh
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
function _npm_brew_paths() {
|
||||
local old_eglob=$(setopt | grep '^extendedglob$')
|
||||
[ -z ${old_eglob} ] && setopt extendedglob
|
||||
echo /usr/local/lib/node_modules/^npm/bin
|
||||
[ -z ${old_eglob} ] && setopt noextendedglob
|
||||
}
|
||||
|
||||
# add /usr/local/lib/node_modules/^npm/bin to PATH
|
||||
for p in `_npm_brew_paths`;
|
||||
[ -d $p ] && path=($p $path)
|
||||
unset _npm_brew_paths
|
||||
Loading…
Add table
Add a link
Reference in a new issue