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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
3 additions and
4 deletions
-
functions/zbnc_npx_list_executables
-
functions/zbnc_zsh_better_npm_completion_npx
-
zsh-better-npm-completion.plugin.zsh
|
|
@ -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 |
|
|
@ -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 |
|
|
|
|
|
@ -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 |
|
|
|