Skip to content
Myr

[readme] update `cdnvm` implementation

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by farmer · committed by Jordan Harband · parent 87f3790 · Browse files · 1 file+1 added−9 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−9 removed

  • other:+1 added−9 removed

1 file+1 added−9 removed

modified:README.md+1 added-9 removed
501 unmodified lines
502503Put the following at the end of your `$HOME/.bashrc`:504505```bash506find-up() {507 path=$(pwd)508 while [[ "$path" != "" && ! -e "$path/$1" ]]; do509 path=${path%/*}510 done511 echo "$path"512}513506cdnvm() {507 cd "$@";516 nvm_path=$(find-up .nvmrc | tr -d '\n')508 nvm_path=$(nvm_find_up .nvmrc | tr -d '\n')509510 # If there are no .nvmrc file, use the default nvm version511 if [[ ! $nvm_path = *[^[:space:]]* ]]; then512
401 unmodified lines