summaryrefslogtreecommitdiff
path: root/plugins/npx/npx.plugin.zsh
blob: c1e2eca9889c21574db0385908c1c5b0f33c40b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
if (( ! $+commands[npx] )); then
  return
fi

if ! npx_fallback_script="$(npx --shell-auto-fallback zsh 2>/dev/null)"; then
  print -u2 ${(%):-"%F{yellow}This \`npx\` version ($(npx --version)) is not supported.%f"}
else
  source <(<<< "$npx_fallback_script")
fi

print -u2 ${(%):-"%F{yellow}The \`npx\` plugin is deprecated and will be removed soon. %BPlease disable it%b.%f"}
unset npx_fallback_script