fnm
fnm copied to clipboard
fish: Unknown command: fnm
After installing fnm in fish, following the steps, and starting a new fish terminal :
fish: Unknown command: fnm
~/.config/fish/conf.d/fnm.fish (line 4):
fnm env | source
It seems fnm command is not visible to fish yet? But running "fnm" in fish shell is recognized.
I fixed it by adding the full path: (~/.config/fish/conf.d/fnm.fish)
# fnm
set PATH /Users/david/.fnm $PATH
/opt/homebrew/bin/fnm env | source
How did you install fnm? Through the installation script?
Yes, I used the installation script Got a new M1 laptop, installing everything from scratch (latest versions), iterm2, homebrew, fish, fnm. I restarted, to see if helps, it didn't.
I've the same problem with M1 chip and fish shell
Oh no. Looks like the fnm
script got loaded before Homebrew added it to the $PATH
. Can you try append the contents from ~/.config/fish/conf.d/fnm.fish
into your fish config? (and comment out the lines in the original file)
@Schniz It looks like you are right. https://github.com/fish-shell/fish-shell/issues/3099
Files in the conf.d folder are getting executed before config.fish and I'm supplying homebrew's
path in config.fish.
As a workaround I gave the full path of fnm executable in conf.d/fnm.fish like @dcorb mentioned.
aah, this makes sense. The information you provided is very helpful! I would be happy to contribute by adding this to the documentation if it hasn't been included yet?