Re:The fish shell is amazing
by waterhouse on Friday November 26, 2021 @04:12AM
(#29348594)
For example, Macports puts its installed binaries into /opt/local/bin (and sbin), and the installation process put this into my .profile:
# MacPorts Installer addition on 2016-07-01_at_00:46:04: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.
And I had to put the fish equivalent of that into ~/.config/fish/config.fish myself.Umm, you don't need to define your PATH variable in `config.fish`, not unless you make it your default login and user shell.
You should keep using bash as your default login and user shell, define your environment variables, like PATH, in your `.bashrc`/`.bash_profile` but use fish as the default shell of your terminal emulator. In that case, fish should pick up the PATH from bash.
That addresses only the part of setting up PATH variable. Some init scripts go beyond that and have additional code embedded in them (see sdkman, pyenv). These needs separate init scripts for fish users. Just a cursory look at github issues can show how prevalent this issue is:
Python venv works fine with fish shell for me. But yeah, this is something that'll always be an issue with fish simply because bash is more widely used.
Unlike what some people may think, it's not just about the tool itself but its ecosystem as well.
such as?