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:
- Open
~/.config/fish/config.fish
in your favorite editor. If it's not already there, it'll make it for you. (Don'tsu
it though.) - Add all the aliases you want. It'll save them and always load then because this is apparently Fish's version of bashrc.
- Save it, baby!
- Enjoy.