From f12cc8b42534ae21d0644d7fdfbd2a9b81515add Mon Sep 17 00:00:00 2001 From: Gal Schlezinger Date: Thu, 14 Feb 2019 16:40:24 +0200 Subject: [PATCH] Make multi the default for new installations --- .ci/install.sh | 12 ++++++------ README.md | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.ci/install.sh b/.ci/install.sh index 51f6b74..a93d1c7 100755 --- a/.ci/install.sh +++ b/.ci/install.sh @@ -66,12 +66,12 @@ setup_shell() { echo "" echo ' # fnm' echo ' export PATH=$HOME/.fnm:$PATH' - echo ' eval `fnm env`' + echo ' eval `fnm env --multi`' echo '' >> $CONF_FILE echo '# fnm' >> $CONF_FILE echo 'export PATH=$HOME/.fnm:$PATH' >> $CONF_FILE - echo 'eval `fnm env`' >> $CONF_FILE + echo 'eval `fnm env --multi`' >> $CONF_FILE elif [ "$CURRENT_SHELL" == "fish" ]; then CONF_FILE=$HOME/.config/fish/config.fish @@ -79,12 +79,12 @@ setup_shell() { echo "" echo ' # fnm' echo ' set PATH $HOME/.fnm $PATH' - echo ' eval (fnm env --fish)' + echo ' eval (fnm env --multi --fish)' echo '' >> $CONF_FILE echo '# fnm' >> $CONF_FILE echo 'set PATH $HOME/.fnm $PATH' >> $CONF_FILE - echo 'eval (fnm env --fish)' >> $CONF_FILE + echo 'eval (fnm env --multi --fish)' >> $CONF_FILE elif [ "$CURRENT_SHELL" == "bash" ]; then CONF_FILE=$HOME/.bashrc @@ -92,12 +92,12 @@ setup_shell() { echo "" echo ' # fnm' echo ' export PATH=$HOME/.fnm:$PATH' - echo ' eval `fnm env`' + echo ' eval `fnm env --multi`' echo '' >> $CONF_FILE echo '# fnm' >> $CONF_FILE echo 'export PATH=$HOME/.fnm:$PATH' >> $CONF_FILE - echo 'eval `fnm env`' >> $CONF_FILE + echo 'eval `fnm env --multi`' >> $CONF_FILE else echo "Could not infer shell type. Please set up manually." diff --git a/README.md b/README.md index 952f9a0..78f659e 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ curl https://raw.githubusercontent.com/Schniz/fnm/master/.ci/install.sh | bash - Add the following line to your `.bashrc`/`.zshrc` file: ```bash - eval `fnm env` + eval `fnm env --multi` ``` If you are using [fish shell](https://fishshell.com/), add this line to your `config.fish` file: @@ -64,12 +64,13 @@ Lists the installed Node versions. Lists the Node versions available to download remotely. -### `fnm env [--multi] [--fish]` +### `fnm env [--multi] [--fish] [--node-dist-mirror=URI]` Prints the required shell commands in order to configure your shell, Bash compliant by default. - Providing `--multi` will output the multishell support, allowing a different current Node version per shell - Providing `--fish` will output the Fish-compliant version. +- Providing `--node-dist-mirror="https://npm.taobao.org/dist"` will use the Chinese mirror of Node.js ## Future Plans