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

Prevent duplicate fnm_multishells in PATH #1309

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
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,23 +149,32 @@ 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)"
# fnm
if ! shopt -q login_shell && command -v fnm > /dev/null; then
eval "$(fnm env --use-on-cd --shell bash)"
fi
```

#### Zsh

Add the following to your `.zshrc` profile:

```zsh
eval "$(fnm env --use-on-cd --shell zsh)"
# fnm
if ! [[ -o login ]] && command -v fnm > /dev/null; then
eval "$(fnm env --use-on-cd --shell zsh)"
fi
```

#### Fish shell

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

```fish
fnm env --use-on-cd --shell fish | source
# fnm
if not status --is-login; and command -v fnm > /dev/null
fnm env --use-on-cd --shell fish | source
end
```

#### PowerShell
Expand Down