Browse Source

Make multi the default for new installations

remotes/origin/add-simple-redirecting-site
Gal Schlezinger 6 years ago
parent
commit
f12cc8b425
  1. 12
      .ci/install.sh
  2. 5
      README.md

12
.ci/install.sh

@ -66,12 +66,12 @@ setup_shell() {
echo "" echo ""
echo ' # fnm' echo ' # fnm'
echo ' export PATH=$HOME/.fnm:$PATH' echo ' export PATH=$HOME/.fnm:$PATH'
echo ' eval `fnm env`' echo ' eval `fnm env --multi`'
echo '' >> $CONF_FILE echo '' >> $CONF_FILE
echo '# fnm' >> $CONF_FILE echo '# fnm' >> $CONF_FILE
echo 'export PATH=$HOME/.fnm:$PATH' >> $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 elif [ "$CURRENT_SHELL" == "fish" ]; then
CONF_FILE=$HOME/.config/fish/config.fish CONF_FILE=$HOME/.config/fish/config.fish
@ -79,12 +79,12 @@ setup_shell() {
echo "" echo ""
echo ' # fnm' echo ' # fnm'
echo ' set PATH $HOME/.fnm $PATH' echo ' set PATH $HOME/.fnm $PATH'
echo ' eval (fnm env --fish)' echo ' eval (fnm env --multi --fish)'
echo '' >> $CONF_FILE echo '' >> $CONF_FILE
echo '# fnm' >> $CONF_FILE echo '# fnm' >> $CONF_FILE
echo 'set PATH $HOME/.fnm $PATH' >> $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 elif [ "$CURRENT_SHELL" == "bash" ]; then
CONF_FILE=$HOME/.bashrc CONF_FILE=$HOME/.bashrc
@ -92,12 +92,12 @@ setup_shell() {
echo "" echo ""
echo ' # fnm' echo ' # fnm'
echo ' export PATH=$HOME/.fnm:$PATH' echo ' export PATH=$HOME/.fnm:$PATH'
echo ' eval `fnm env`' echo ' eval `fnm env --multi`'
echo '' >> $CONF_FILE echo '' >> $CONF_FILE
echo '# fnm' >> $CONF_FILE echo '# fnm' >> $CONF_FILE
echo 'export PATH=$HOME/.fnm:$PATH' >> $CONF_FILE echo 'export PATH=$HOME/.fnm:$PATH' >> $CONF_FILE
echo 'eval `fnm env`' >> $CONF_FILE echo 'eval `fnm env --multi`' >> $CONF_FILE
else else
echo "Could not infer shell type. Please set up manually." echo "Could not infer shell type. Please set up manually."

5
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: - Add the following line to your `.bashrc`/`.zshrc` file:
```bash ```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: 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. 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. 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 `--multi` will output the multishell support, allowing a different current Node version per shell
- Providing `--fish` will output the Fish-compliant version. - 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 ## Future Plans

Loading…
Cancel
Save