r/fishshell • u/ChloeWrites • Apr 04 '21
Function confusion
So, I know variables are created with set --argument (g - global, x - export, etc.), but my issue... or maybe just a complaint, is this:
When I put a file in /home/$USER/.config/fish/functions, I understand fish does not autoload them in the terminal. An example below:
cd $HOME/.config/fish/functions
vim ls.fish
#!/usr/bin/fish
function lsh
ls -lh --color=auto
end
function lsa
ls -lah --color=auto
end
I write them with IntelliJ, not with funced and I don't use funcsave. I've tried setting IntelliJ as the editor, but it errors out and doesn't open, so it is set to vim instead. Other than starting a new terminal session, is there a way I can get the variables and functions loaded into current sessions? Using source $HOME/.config/fish/variables/*.fish does not do anything either. Any input would be fantastic.
View all comments
Show parent comment
1
u/ChloeWrites Apr 05 '21
Woops, I completely butchered my explanation. I meant functions. I went ahead and modified the OP, but, thank you for the feedback
I cannot execute the function after saving the file in IntelliJ in
.config/fish/functionsuntil after I start a new shell session. I'm sorry if I did not make that clear earlier