Coder Social home page Coder Social logo

Comments (1)

kris-anderson avatar kris-anderson commented on September 22, 2024

I think I may have figured this out.

I updated my path setting towards the top of my config.fish file to the following:

set -gx PATH "$HOME/.local/bin" "$PYENV_ROOT/bin" "$HOME/Library/Application\ Support/fnm" /opt/homebrew/opt/ruby/bin /opt/homebrew/sbin /opt/homebrew/bin $PATH

In the above path command, I removed the path of "$FNM_MULTISHELL_PATH/bin" that I was setting previously

I then deleted my $HOME/.config/fish/conf.d/fnm.fish file.

The fnm automatic install script creates the above file, but if I do that, it puts the path to fnm after my homebrew paths. So to get around that, I deleted the above file, and I put the source call for fnm towards the bottom of my config.fish file:

# fnm
/opt/homebrew/bin/fnm env --use-on-cd | source

# Pyenv
pyenv init - | source

# Starship prompt
starship init fish | source

With the above setup, I now have the path for fnm set to be before the path for Homebrew, and it's only showing up once in my echo $PATH:

/Users/kris/.pyenv/shims /Users/kris/Library/Caches/fnm_multishells/23714_1707382543780/bin /Users/kris/.local/bin /Users/kris/.pyenv/bin /Users/kris/Library/Application\ Support/fnm /opt/homebrew/opt/ruby/bin /opt/homebrew/sbin /opt/homebrew/bin /usr/local/bin /System/Cryptexes/App/usr/bin /usr/bin /bin /usr/sbin /sbin /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin /Applications/VMware Fusion.app/Contents/Public /usr/local/MacGPG2/bin /Applications/Wireshark.app/Contents/MacOS /Applications/kitty.app/Contents/MacOS

I'm open to feedback on if there's a better way to do this. But if not, we can close this issue and hopefully the above is helpful for anyone else with both fnm and homebrew installing node, and using fish as their shell.

from fnm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.