.local/share/bash-completion/completions/npm
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sat, 16 Dec 2023 18:07:34 +0200
changeset 1038 79c56b8fb8e0
parent 1037 b386e087b97f
permissions -rw-r--r--
Moved Bash completion for "hgsync" to "utils" module.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1037
b386e087b97f Added workaround for Cygwin, npm authors explicitly forbids it:
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1036
diff changeset
     1
if [[ $OSTYPE = cygwin ]]; then
b386e087b97f Added workaround for Cygwin, npm authors explicitly forbids it:
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1036
diff changeset
     2
  # eval "$(MSYSTEM=MINGW64 npm completion | tr -d $'\r')"
b386e087b97f Added workaround for Cygwin, npm authors explicitly forbids it:
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1036
diff changeset
     3
  _npm_completion () {
b386e087b97f Added workaround for Cygwin, npm authors explicitly forbids it:
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1036
diff changeset
     4
    IFS=$'\n' COMPREPLY=( $(MSYSTEM=MINGW64 COMP_CWORD="$COMP_CWORD" COMP_LINE="$COMP_LINE" COMP_POINT="$COMP_POINT" npm completion -- "${COMP_WORDS[@]}" 2>/dev/null) )
b386e087b97f Added workaround for Cygwin, npm authors explicitly forbids it:
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1036
diff changeset
     5
  }
b386e087b97f Added workaround for Cygwin, npm authors explicitly forbids it:
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1036
diff changeset
     6
  complete -o default -F _npm_completion npm
b386e087b97f Added workaround for Cygwin, npm authors explicitly forbids it:
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1036
diff changeset
     7
else
b386e087b97f Added workaround for Cygwin, npm authors explicitly forbids it:
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1036
diff changeset
     8
  eval "$(npm completion)"
b386e087b97f Added workaround for Cygwin, npm authors explicitly forbids it:
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1036
diff changeset
     9
fi