diff --git a/README.md b/README.md index a5d70f9..ea5900b 100644 --- a/README.md +++ b/README.md @@ -118,31 +118,33 @@ Please follow your shell instructions to install them. ### Shell Setup -fnm needs to run some shell commands before you can start using it. -This is done by evaluating the output of `fnm env`. Check out the following guides for the shell you use: +Environment variables need to be setup before you can start using fnm. +This is done by evaluating the output of `fnm env`. +To automatically run `fnm use` when a directory contains a `.node-version` or `.nvmrc` file, add the `--use-on-cd` option to your shell setup. +Check out the following guides for the shell you use: #### Bash -add the following to your `.bashrc` profile: +Add the following to your `.bashrc` profile: ```bash -eval "$(fnm env)" +eval "$(fnm env --use-on-cd)" ``` #### Zsh -add the following to your `.zshrc` profile: +Add the following to your `.zshrc` profile: ```zsh -eval "$(fnm env)" +eval "$(fnm env --use-on-cd)" ``` #### Fish shell -create `~/.config/fish/conf.d/fnm.fish` add this line to it: +Create `~/.config/fish/conf.d/fnm.fish` add this line to it: ```fish -fnm env | source +fnm env --use-on-cd | source ``` #### PowerShell @@ -167,7 +169,7 @@ FOR /f "tokens=*" %i IN ('fnm env --use-on-cd') DO CALL %i #### Usage with Cmder -Usage is very similar to the normal WinCMD install, apart for a few tweaks to allow being called from the cmder startup script. The example **assumes** that the `CMDER_ROOT` environment variable is **set** to the **root directory** of your Cmder installation. +Usage is very similar to the normal WinCMD install, apart for a few tweaks to allow being called from the cmder startup script. The example **assumes** that the `CMDER_ROOT` environment variable is **set** to the **root directory** of your Cmder installation. Then you can do something like this: - Make a .cmd file to invoke it