author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 11 Dec 2023 00:27:20 +0200 | |
changeset 1037 | b386e087b97f |
parent 1036 | 5b1ba85724fd |
permissions | -rw-r--r-- |
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 |