I'm specifically trying to get NVM to work on Elementary OS with Fish and IntelliJ.
There is a fish script that works pretty well as long as I stay in the terminal. However, when I launch my IDE from my desktop environment it does not inherit the path modifications made by that fish script. From my guess this is because it's still reading in ~/.profile
when launching applications, but does not get any access to the variables set inside the fish config.
What's the proper way to resolve this? Maybe there's a way to load the fish env when launching an application? Or should I simply not use fish_add_path
etc, avoid fish's nvm and use the bash variant inside ~/.profile
? Or is there another solution?
$SHELL
. Either that, or it just defaults tosh
. What doesecho $SHELL
return? Do you have it set tofish
? If not, try runningchsh
to default tofish
and then relaunching your IDE. Does that solve it?chsh
and my normal terminal is running fish (same with the one inside intelliJ). I'm launching my IDE from the window manager though, not from the terminal, so my guess is that the terminal is inheriting my env from the window manager, which does not seem to inherit it from fish at any time.echo $SHELL
returns/bin/fish
? Does it return the same thing when run in a terminal and when run within your IDE?/usr/bin/fish
. But I don't know how exactly the IDE spawns this terminal (I don't normally use it as it's too slow for fish and right now it shows a bunch of errors likeerror: Unable to open universal variable file '/': Read-only file system
which I'm guessing is because it's installed by snap). Now that I think about it, maybe it could also be a snap-related issue?ps -p $$
return in the IDE shell?