Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation to direct users to the recursive file strategy #1359

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,31 +153,31 @@ Check out the following guides for the shell you use:
Add the following to your `.bashrc` profile:

```bash
eval "$(fnm env --use-on-cd --shell bash)"
eval "$(fnm env --use-on-cd --version-file-strategy recursive --shell bash)"
```

#### Zsh

Add the following to your `.zshrc` profile:

```zsh
eval "$(fnm env --use-on-cd --shell zsh)"
eval "$(fnm env --use-on-cd --version-file-strategy recursive --shell zsh)"
```

#### Fish shell

Create `~/.config/fish/conf.d/fnm.fish` and add this line to it:

```fish
fnm env --use-on-cd --shell fish | source
fnm env --use-on-cd --version-file-strategy recursive --shell fish | source
```

#### PowerShell

Add the following to the end of your profile file:

```powershell
fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression
fnm env --use-on-cd --version-file-strategy recursive --shell powershell | Out-String | Invoke-Expression
```

- For macOS/Linux, the profile is located at `~/.config/powershell/Microsoft.PowerShell_profile.ps1`
Expand All @@ -202,7 +202,7 @@ fnm is also supported but is not entirely covered. You can set up a startup scri
:: for /F will launch a new instance of cmd so we create a guard to prevent an infnite loop
if not defined FNM_AUTORUN_GUARD (
set "FNM_AUTORUN_GUARD=AutorunGuard"
FOR /f "tokens=*" %%z IN ('fnm env --use-on-cd') DO CALL %%z
FOR /f "tokens=*" %%z IN ('fnm env --use-on-cd --version-file-strategy recursive') DO CALL %%z
)
```

Expand All @@ -216,7 +216,7 @@ Then you can do something like this:
```batch
:: %CMDER_ROOT%\bin\fnm_init.cmd
@echo off
FOR /f "tokens=*" %%z IN ('fnm env --use-on-cd') DO CALL %%z
FOR /f "tokens=*" %%z IN ('fnm env --use-on-cd --version-file-strategy recursive') DO CALL %%z
```

- Add it to the startup script
Expand Down