Browse Source

Fall back to default completion on other npm commands

pull/2/head
Luke Childs 9 years ago
parent
commit
0f53435ae2
  1. 7
      npm-run-completion.zsh

7
npm-run-completion.zsh

@ -12,6 +12,13 @@ _npm_run_completion() {
local options=("${(@f)$(node -e "var pkg = require('$dir/$filename'); pkg.scripts && Object.keys(pkg.scripts).forEach(function(script) { console.log(script.replace(':', '\\\:')+':$ '+pkg.scripts[script]) })")}")
_describe 'values' options
fi
else
compadd -- $(COMP_CWORD=$((CURRENT-1)) \
COMP_LINE=$BUFFER \
COMP_POINT=0 \
npm completion -- "${words[@]}" \
2>/dev/null)
IFS=$si
fi
}

Loading…
Cancel
Save