Skip to content

Instantly share code, notes, and snippets.

@jbinto
Created March 18, 2014 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbinto/9621435 to your computer and use it in GitHub Desktop.
Save jbinto/9621435 to your computer and use it in GitHub Desktop.
npm zsh completion broken
% npm egrep: empty (sub)expression 1 ↵
\"\$\{COMP_WORDS\[@\]\}\"
\"\$\{words\[@\]\}\"
\#
\#\#\#-begin-npm-completion-\#\#\#
\#\#\#-end-npm-completion-\#\#\#
\$\(COMP_CWORD=\$\(\(CURRENT-1\)\)
\$\?
\&\>/dev/null\;
\(\)
\(or
--
-Ac
-F
-K
-cn
-l
-ln
/usr/local/etc/bash_completion.d/npm
2\>/dev/null\)
2\>/dev/null\)\)
\>
\>\>
COMPREPLY=\(\$\(COMP_CWORD=\"\$COMP_CWORD\"
COMP_LINE=\"\$COMP_LINE\"
COMP_LINE=\"\$line\"
COMP_LINE=\$BUFFER
COMP_POINT=\"\$COMP_POINT\"
COMP_POINT=\"\$point\"
COMP_POINT=0
COMP_WORDBREAKS
COMP_WORDBREAKS=\$\{COMP_WORDBREAKS/=/\}
COMP_WORDBREAKS=\$\{COMP_WORDBREAKS/@/\}
IFS=\"\$si\"
IFS=\$\'\\n\'
IFS=\$si
Installation:
Or,
\\
_npm_completion
_npm_completion\(\)
command
compadd
compctl
compdef
complete
completion
cword
cword-=1
elif
export
fi
if
let
line
local
maybe:
npm
point
read
reply=\(\$\(COMP_CWORD=\"\$cword\"
return
script
si
si=\"\$IFS\"
si=\$IFS
then
type
words
\{
\|\|
\}
\~/.bashrc
\~/.zshrc\)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment