aboutsummaryrefslogtreecommitdiff
path: root/network/node/npm.sh
blob: 815edd96308e14a1be8179475ce7e6ea88389a70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# bash completion for npm

_npm_completion () {
  local si="$IFS"
  IFS=$'\n' COMPREPLY=($(COMP_CWORD="$COMP_CWORD" \
                         COMP_LINE="$COMP_LINE" \
                         COMP_POINT="$COMP_POINT" \
                         npm completion -- "${COMP_WORDS[@]}" \
                         2>/dev/null)) || return $?
  IFS="$si"
}
complete -o default -F _npm_completion npm