Skip to content

Commit

Permalink
Add --shell to fnm env commands in the README (#1222)
Browse files Browse the repository at this point in the history
  • Loading branch information
mo8it authored Aug 11, 2024
1 parent 345adaf commit 745e7e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,31 +149,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)"
eval "$(fnm env --use-on-cd --shell bash)"
```

#### Zsh

Add the following to your `.zshrc` profile:

```zsh
eval "$(fnm env --use-on-cd)"
eval "$(fnm env --use-on-cd --shell zsh)"
```

#### Fish shell

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

```fish
fnm env --use-on-cd | source
fnm env --use-on-cd --shell fish | source
```

#### PowerShell

Add the following to the end of your profile file:

```powershell
fnm env --use-on-cd | Out-String | Invoke-Expression
fnm env --use-on-cd --shell power-shell | Out-String | Invoke-Expression
```

- For macOS/Linux, the profile is located at `~/.config/powershell/Microsoft.PowerShell_profile.ps1`
Expand Down

0 comments on commit 745e7e2

Please sign in to comment.