mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-25 01:47:25 +08:00
Compare commits
No commits in common. "c80050d6f538d6d8d8942068ea9bf1d4de2b14e8" and "efe21261d031b4836f64112a899706322acd26b0" have entirely different histories.
c80050d6f5
...
efe21261d0
@ -26,10 +26,9 @@ These settings should go in your zshrc file, before Oh My Zsh is sourced:
|
|||||||
#### Lazy startup
|
#### Lazy startup
|
||||||
|
|
||||||
This option will help you to defer nvm's load until you use it to speed-up your zsh startup. This will source
|
This option will help you to defer nvm's load until you use it to speed-up your zsh startup. This will source
|
||||||
nvm script only when using it, and will create a function for `node`, `npm`, `npx`, `pnpm`, `pnpx`, `yarn`,
|
nvm script only when using it, and will create a function for `node`, `npm`, `npx`, `pnpm`, `yarn`, `corepack`
|
||||||
`corepack` and the command(s) specified by `lazy-cmd` option, so when you call either of them, nvm will be
|
and the command(s) specified by `lazy-cmd` option, so when you call either of them, nvm will be loaded and run
|
||||||
loaded and run with default version. To enable it, you can add this snippet to your zshrc, before Oh My Zsh is
|
with default version. To enable it, you can add this snippet to your zshrc, before Oh My Zsh is sourced:
|
||||||
sourced:
|
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
zstyle ':omz:plugins:nvm' lazy yes
|
zstyle ':omz:plugins:nvm' lazy yes
|
||||||
|
|||||||
@ -74,7 +74,7 @@ function _omz_setup_autoload {
|
|||||||
if zstyle -t ':omz:plugins:nvm' lazy; then
|
if zstyle -t ':omz:plugins:nvm' lazy; then
|
||||||
# Call nvm when first using nvm, node, npm, pnpm, yarn, corepack or other commands in lazy-cmd
|
# Call nvm when first using nvm, node, npm, pnpm, yarn, corepack or other commands in lazy-cmd
|
||||||
zstyle -a ':omz:plugins:nvm' lazy-cmd nvm_lazy_cmd
|
zstyle -a ':omz:plugins:nvm' lazy-cmd nvm_lazy_cmd
|
||||||
nvm_lazy_cmd=(nvm node npm npx pnpm pnpx yarn corepack $nvm_lazy_cmd) # default values
|
nvm_lazy_cmd=(nvm node npm npx pnpm yarn corepack $nvm_lazy_cmd) # default values
|
||||||
eval "
|
eval "
|
||||||
function $nvm_lazy_cmd {
|
function $nvm_lazy_cmd {
|
||||||
for func in $nvm_lazy_cmd; do
|
for func in $nvm_lazy_cmd; do
|
||||||
|
|||||||
@ -445,7 +445,7 @@ _scd_Y19oug_match() {
|
|||||||
# build a list of matching directories reverse-sorted by their probabilities
|
# build a list of matching directories reverse-sorted by their probabilities
|
||||||
dmatching=( ${(f)"$(
|
dmatching=( ${(f)"$(
|
||||||
builtin printf "%s %s\n" ${(Oakv)drank} |
|
builtin printf "%s %s\n" ${(Oakv)drank} |
|
||||||
command sort -grk1 )"}
|
/usr/bin/sort -grk1 )"}
|
||||||
)
|
)
|
||||||
dmatching=( ${dmatching#*[[:blank:]]} )
|
dmatching=( ${dmatching#*[[:blank:]]} )
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user