Fish-Shell Will Not Save my Aliases

A fish alias is actually implemented as a function. To save a function, you need funcsave. So this is the sequence

alias foo=bar
funcsave foo

That creates ~/.config/fish/functions/foo.fish which will then be available in any fish session.


It basically boiled down to:

  1. Open ~/.config/fish/config.fish in your favorite editor. If it's not already there, it'll make it for you. (Don't su it though.)
  2. Add all the aliases you want. It'll save them and always load then because this is apparently Fish's version of bashrc.
  3. Save it, baby!
  4. Enjoy.

Tags:

Shell

Alias

Fish