Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
ac9a8cb6
Commit
ac9a8cb6
authored
Sep 10, 2016
by
Marc Cornellà
Browse files
Merge branch 'fix/cached-npm-completion'
Fixes #5332
parents
27fff272
b70842ba
Changes
1
Show whitespace changes
Inline
Side-by-side
plugins/npm/npm.plugin.zsh
View file @
ac9a8cb6
...
@@ -2,10 +2,13 @@
...
@@ -2,10 +2,13 @@
__NPM_COMPLETION_FILE
=
"
${
ZSH_CACHE_DIR
}
/npm_completion"
__NPM_COMPLETION_FILE
=
"
${
ZSH_CACHE_DIR
}
/npm_completion"
if
[[
!
-f
$__NPM_COMPLETION_FILE
]]
;
then
if
[[
!
-f
$__NPM_COMPLETION_FILE
]]
;
then
npm completion
>!
$__NPM_COMPLETION_FILE
||
rm
-f
$__NPM_COMPLETION_FILE
npm completion
>!
$__NPM_COMPLETION_FILE
2>/dev/null
[[
$?
-ne
0
]]
&&
rm
-f
$__NPM_COMPLETION_FILE
fi
fi
source
$__NPM_COMPLETION_FILE
[[
-f
$__NPM_COMPLETION_FILE
]]
&&
source
$__NPM_COMPLETION_FILE
unset
__NPM_COMPLETION_FILE
}
}
# Install dependencies globally
# Install dependencies globally
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment