Compare commits
4 Commits
5c2af603ad
...
49d21e6774
Author | SHA1 | Date |
---|---|---|
|
49d21e6774 | |
|
35228e5ac0 | |
|
3c89229e0e | |
|
3dc13483c1 |
|
@ -83,6 +83,14 @@ rm -f ~/.zcompdump; compinit
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
Second Solution:
|
||||||
|
zsh-completions as a plugin, they suggest manually adding its source directory to fpath before sourcing oh-my-zsh.sh.
|
||||||
|
This ensures Zsh loads the completion files only once, improving performance.
|
||||||
|
Recommended Fix:
|
||||||
|
Instead of the existing method, they propose adding this line:
|
||||||
|
|
||||||
|
fpath=($ZSH/custom/plugins/zsh-completions/src $fpath)
|
||||||
|
|
||||||
### Contributing
|
### Contributing
|
||||||
|
|
||||||
Contributions are welcome, see [CONTRIBUTING](https://github.com/zsh-users/zsh-completions/blob/master/CONTRIBUTING.md).
|
Contributions are welcome, see [CONTRIBUTING](https://github.com/zsh-users/zsh-completions/blob/master/CONTRIBUTING.md).
|
||||||
|
|
42
src/_nvm
42
src/_nvm
|
@ -28,7 +28,7 @@
|
||||||
# Description
|
# Description
|
||||||
# -----------
|
# -----------
|
||||||
#
|
#
|
||||||
# Completion script for nvm v0.39.2 (https://github.com/nvm-sh/nvm).
|
# Completion script for nvm v0.40.3 (https://github.com/nvm-sh/nvm).
|
||||||
#
|
#
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Authors
|
# Authors
|
||||||
|
@ -67,87 +67,89 @@ __nvm() {
|
||||||
'--no-progress[Disable the progress bar on any downloads]' \
|
'--no-progress[Disable the progress bar on any downloads]' \
|
||||||
'--alias=[After installing, set the alias specified to the version specified]' \
|
'--alias=[After installing, set the alias specified to the version specified]' \
|
||||||
'--default[After installing, set default alias to the version specified]' \
|
'--default[After installing, set default alias to the version specified]' \
|
||||||
|
'--save[After installing, write the specified version to .nvmrc]' \
|
||||||
'1::version:__nvm_versions' \
|
'1::version:__nvm_versions' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(uninstall)
|
(uninstall)
|
||||||
_arguments -C \
|
_arguments \
|
||||||
'--lts=[When installing, only select from LTS versions]::lts_name' \
|
'--lts=-[When installing, only select from LTS versions]::lts_name' \
|
||||||
'1: :__nvm_installed_versions' \
|
'1: :__nvm_installed_versions' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(use)
|
(use)
|
||||||
_arguments -C \
|
_arguments \
|
||||||
'--silent[Silences stdout/stderr output]' \
|
'--silent[Silences stdout/stderr output]' \
|
||||||
'--lts=[When installing, only select from LTS versions]::lts_name' \
|
'--lts=-[When installing, only select from LTS versions]::lts_name' \
|
||||||
'1: :__nvm_installed_versions' \
|
'1: :__nvm_installed_versions' \
|
||||||
'*: :_normal' \
|
'*: :_normal' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(exec)
|
(exec)
|
||||||
_arguments -C \
|
_arguments \
|
||||||
'--silent[Silences stdout/stderr output]' \
|
'--silent[Silences stdout/stderr output]' \
|
||||||
'--lts=[When installing, only select from LTS versions]::lts_name' \
|
'--lts=-[When installing, only select from LTS versions]::lts_name' \
|
||||||
'1: :__nvm_installed_versions' \
|
'1: :__nvm_installed_versions' \
|
||||||
'*: :_normal' \
|
'*: :_normal' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(run)
|
(run)
|
||||||
_arguments -C \
|
_arguments \
|
||||||
'--silent[Silences stdout/stderr output]' \
|
'--silent[Silences stdout/stderr output]' \
|
||||||
'--lts=[When installing, only select from LTS versions]::lts_name' \
|
'--lts=-[When installing, only select from LTS versions]::lts_name' \
|
||||||
'1: :__nvm_installed_versions' \
|
'1: :__nvm_installed_versions' \
|
||||||
'*: :_normal' \
|
'*: :_normal' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(ls)
|
(ls)
|
||||||
_arguments -C \
|
_arguments \
|
||||||
'--no-colors[Suppress colored output]' \
|
'--no-colors[Suppress colored output]' \
|
||||||
'--no-alias[Suppress `nvm alias` output]' \
|
'--no-alias[Suppress `nvm alias` output]' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(ls-remote)
|
(ls-remote)
|
||||||
_arguments -C \
|
_arguments \
|
||||||
'--silent[Silences stdout/stderr output]' \
|
'--silent[Silences stdout/stderr output]' \
|
||||||
'--lts=[When installing, only select from LTS versions]::lts_name' \
|
'--lts=-[When installing, only select from LTS versions]::lts_name' \
|
||||||
'--no-colors[Suppress colored output]' \
|
'--no-colors[Suppress colored output]' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(version-remote)
|
(version-remote)
|
||||||
_arguments -C \
|
_arguments \
|
||||||
'--lts=[When installing, only select from LTS versions]::lts_name' \
|
'--lts=-[When installing, only select from LTS versions]::lts_name' \
|
||||||
'1: :__nvm_versions' \
|
'1: :__nvm_versions' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(deactivate)
|
(deactivate)
|
||||||
_arguments -C \
|
_arguments \
|
||||||
'--silent=[Silences stdout/stderr output]' \
|
'--silent=[Silences stdout/stderr output]' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(alias)
|
(alias)
|
||||||
_arguments -C \
|
_arguments \
|
||||||
'1:name' \
|
'1:name' \
|
||||||
'2:version:__nvm_installed_versions' \
|
'2:version:__nvm_installed_versions' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(unalias)
|
(unalias)
|
||||||
_arguments -C \
|
_arguments \
|
||||||
'1:version:__nvm_installed_versions' \
|
'1:version:__nvm_installed_versions' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(reinstall-package)
|
(reinstall-package)
|
||||||
_arguments -C \
|
_arguments \
|
||||||
'--silent=[Silences stdout/stderr output]' \
|
'--silent=[Silences stdout/stderr output]' \
|
||||||
'1: :__nvm_installed_versions' \
|
'1: :__nvm_installed_versions' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(which)
|
(which)
|
||||||
_arguments -C \
|
_arguments \
|
||||||
|
'--silent[Silences stdout/stderr output when a version is omitted]' \
|
||||||
'1: : _alternative "version:version:__nvm_installed_versions" "current: :(current)"' \
|
'1: : _alternative "version:version:__nvm_installed_versions" "current: :(current)"' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(cache)
|
(cache)
|
||||||
_arguments -C \
|
_arguments \
|
||||||
'1: :__nvm_cache_subcommands' \
|
'1: :__nvm_cache_subcommands' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue