node.npm.sh 383 B

1234567891011121314
  1. # bash completion for npm
  2. _npm_completion () {
  3. local si="$IFS"
  4. IFS=$'\n' COMPREPLY=($(COMP_CWORD="$COMP_CWORD" \
  5. COMP_LINE="$COMP_LINE" \
  6. COMP_POINT="$COMP_POINT" \
  7. npm completion -- "${COMP_WORDS[@]}" \
  8. 2>/dev/null)) || return $?
  9. IFS="$si"
  10. }
  11. complete -F _npm_completion npm