.local/share/bash-completion/completions/npm
author Oleksandr Gavenko <gavenkoa@gmail.com>
Mon, 01 Jan 2024 20:53:49 +0200
changeset 1039 78cdb4a057e3
parent 1037 b386e087b97f
permissions -rw-r--r--
Create symlink from ~/.bash_profile for login shell to activate my ~/.bashrc.

if [[ $OSTYPE = cygwin ]]; then
  # eval "$(MSYSTEM=MINGW64 npm completion | tr -d $'\r')"
  _npm_completion () {
    IFS=$'\n' COMPREPLY=( $(MSYSTEM=MINGW64 COMP_CWORD="$COMP_CWORD" COMP_LINE="$COMP_LINE" COMP_POINT="$COMP_POINT" npm completion -- "${COMP_WORDS[@]}" 2>/dev/null) )
  }
  complete -o default -F _npm_completion npm
else
  eval "$(npm completion)"
fi