Browse Source

Merge pull request #1 from iloveitaly/fix-npx

Fix spelling and invalid trailing >
pull/20/head
Grigorii Horos 4 years ago
committed by GitHub
parent
commit
edaee8e758
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      functions/zbnc_npx_list_executables
  2. 2
      functions/zbnc_zsh_better_npm_completion_npx
  3. 3
      zsh-better-npm-completion.plugin.zsh

2
functions/zbnc_npx_list_excuteables → functions/zbnc_npx_list_executables

@ -3,7 +3,7 @@ local node_modules="$(dirname package_json)/node_modules"
local bindir="$node_modules/.bin"
# Return if there's no node_modules
[[ ! -e "$node_modules" ]] && return>
[[ ! -e "$node_modules" ]] && return
# Return if there's no .bin in node_modules
[[ ! -e "$bindir" ]] && return

2
functions/zbnc_zsh_better_npm_completion_npx

@ -3,7 +3,7 @@ local package_json="$(zbnc_recursively_look_for package.json)"
# Return if we can't find package.json
[[ "$package_json" = "" ]] && return
_values $(zbnc_npx_list_excuteables "$package_json")
_values $(zbnc_npx_list_executables "$package_json")
# Make sure we don't run default completion
custom_completion=true

3
zsh-better-npm-completion.plugin.zsh

@ -23,8 +23,7 @@ autoload -Uz \
zbnc_recursively_look_for \
zbnc_zsh_better_npm_completion \
zbnc_zsh_better_npm_completion_npx \
zbnc_npx_list_excuteables
zbnc_npx_list_executables
compdef zbnc_zsh_better_npm_completion npm
compdef zbnc_zsh_better_npm_completion_npx npx

Loading…
Cancel
Save