Problem:
⚙ ~ fish --version
fish, version 2.5.0-238-ga811ae2
⚙ ~ echo $FISH_VERSION
2.2.0
Trying to debug:
⚙ ~ exec fish
set: Invalid character “.” in variable name. Only alphanumerical characters and underscores are valid in a variable name.
/usr/local/share/fish/functions/setenv.fish (line 10): set -gx $v $$v
^
in function “setenv”
called on line 46 of file ~/.config/fish/config.fish
with parameter list “LANG en_US.UTF-8”
from sourcing file ~/.config/fish/config.fish
called during startup
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
~ echo $FISH_VERSION
2.5.0-238-ga811ae2
I installed fish 2.2 from apt. Then later installed fish 2.5 from directly the github repo. But it is still using the older fish, I am unsure what is happening here.
There's at least two problems here:
The first one is that you are still executing the old fish. The reason for that is probably that you installed the new fish into /usr/local (most likely because you installed it with
make install, which defaults to that directory), but haven't adjusted your shell setting to point to the new one.To confirm this, run
type -a fish. It should show that fish is both in /usr/bin and /usr/local/bin. To fix this, there are two solutions:chsh -s /usr/local/bin/fish(as described in https://github.com/fish-shell/fish-shell#switching-to-fish)or preferably
The second issue is that
setenverror. You probably have something likesetenv "LANG en_US.UTF-8"(with the quotes) in your config.fish. This will produce that ugly error and will not set the variable like you want. The solution is to eitherset -gx LANG en_US.UTF-8or at leastsetenv LANG en_US.UTF-8(without quotes)or