Browse code

Replaced npm 0.x completion with 1.0 completion.

Sorin Ionescu authored on 01/05/2011 at 15:46:11
Showing 2 changed files
1 1
deleted file mode 100644
... ...
@@ -1,19 +0,0 @@
1
-#compdef npm
2
-
3
-# Node Package Manager 0.3.15 completion, letting npm do all the completion work
4
-
5
-_npm() {
6
-  compadd -- $(_npm_complete $words)
7
-}
8
-
9
-# We want to show all errors of any substance, but never the "npm (not )ok" one.
10
-# (Also doesn't consider "ERR! no match found" worth breaking the terminal for.)
11
-_npm_complete() {
12
-  local ask_npm
13
-  ask_npm=(npm completion --color false --loglevel error -- $@)
14
-  { _call_program npm $ask_npm 2>&1 >&3 \
15
-  | egrep -v '^(npm (not |)ok|ERR! no match found)$' >&2; \
16
-  } 3>&1
17
-}
18
-
19
-_npm "$@"
20 1
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+eval "$(npm completion 2>/dev/null)"