mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 22:31:51 +00:00
Add --silent option to version auto switch commands
This commit is contained in:
parent
e5bd2787ac
commit
9773734707
@ -201,9 +201,9 @@ Put this into your `$HOME/.bashrc` to enable automatic version swithing whenever
|
|||||||
cd() {
|
cd() {
|
||||||
builtin cd "$@"
|
builtin cd "$@"
|
||||||
if [[ -f .nvmrc && -r .nvmrc ]]; then
|
if [[ -f .nvmrc && -r .nvmrc ]]; then
|
||||||
nvm use
|
nvm use --silent
|
||||||
elif [[ `nvm current` != `nvm version default` ]]; then
|
elif [[ `nvm current` != `nvm version default` ]]; then
|
||||||
nvm use default
|
nvm use --silent default
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
cd .
|
cd .
|
||||||
@ -217,9 +217,9 @@ For example, on Ubuntu it should be placed at the very bottom of `$HOME/.bash_pr
|
|||||||
cd() {
|
cd() {
|
||||||
__zsh_like_cd cd "$@"
|
__zsh_like_cd cd "$@"
|
||||||
if [[ -f .nvmrc && -r .nvmrc ]]; then
|
if [[ -f .nvmrc && -r .nvmrc ]]; then
|
||||||
nvm use
|
nvm use --silent
|
||||||
elif [[ `nvm current` != `nvm version default` ]]; then
|
elif [[ `nvm current` != `nvm version default` ]]; then
|
||||||
nvm use default
|
nvm use --silent default
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
cd .
|
cd .
|
||||||
|
Loading…
Reference in New Issue
Block a user