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() { @@ -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() { @@ -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() { @@ -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."

5
README.md

@ -35,7 +35,7 @@ curl https://raw.githubusercontent.com/Schniz/fnm/master/.ci/install.sh | bash @@ -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. @@ -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

Loading…
Cancel
Save