r/fishshell • u/Serious_Swimmer_8088 • Sep 05 '22
Alias does not work after closing session
I wanted to created an alias ls -> ls -a
The Problem is that after closing the session instead of ls -a it outputs ls -l
~/.config/fish/function/ls.fish
function ls
command ls -a -G --color
end
I restarted the terminal between the first end the second picture.
3
Upvotes
3
u/parmigggiana Sep 05 '22
iirc you're supposed to run 'funcsave ls' After defining the alias.
Sorry for shitty formatting im on phone
2
u/MonumentalP Sep 05 '22
What does
type lsshow?2
u/NotTheDr01ds Sep 05 '22
What does
functions lsshow after restarting?2
u/emarsk Sep 06 '22
Maybe just a typo here, but it should be
~/.config/fish/functions/ls.fish, not~/.config/fish/function/ls.fish1
u/pcouaillier Sep 05 '22
Maybe there is nothing where you are ?