Abhishek Bhatia
Abhishek Bhatia

Reputation: 9806

How to replace old fish installation

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.

Upvotes: 0

Views: 248

Answers (1)

faho
faho

Reputation: 15924

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:

or preferably


The second issue is that setenv error. You probably have something like setenv "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 either

  • Use set -gx LANG en_US.UTF-8 or at least setenv LANG en_US.UTF-8 (without quotes)

or

  • Stop setting $LANG - fish since version 2.4.0 will set the locale on its own when it hasn't received one.

Upvotes: 1

Related Questions