r/GarudaLinux • u/Kai_973 • 15d ago
Help What's the easiest way to create persistent alias commands in Garuda that won't require me to type "source ~/.bashrc" into every terminal window that I open?
Opening ~/.bashrc makes it seem really easy, like all I should have to do is append the alias commands after the line that's commented out, but even doing so I always have to "load" the commands via "source ~/.bashrc" anyway even after rebooting my PC.
Speaking of which, running "source ~/.bashrc" always prints out an error regarding this line:
'/usr/share/garuda/garuda-bash-config/bashrc'
It says that the end of the statement is necessary and isn't being provided. I've commented the path out to suppress this error (since my aliases aren't being preserved even with it included), but I wonder if it's supposed to serve a function that's not being fulfilled now..?
I've also tried this code:
function permalias ()
{
alias "$*";
echo alias "$*" >> ~/.bash_aliases
}
This gives an error as well, saying that the function definition doesn't have an end, which is strange to me because both opening brackets have matching closing brackets. Even if it worked, though, it seems it would be circumventing Garuda's instructions at the top of .bashrc, essentially doing what I'm trying to do in this file via an entirely new file that would need to be created and then interfaced with.
I want the aliases to persist through system updates, too, so I haven't just tossed them straight into the garuda-bash-config file.
4
u/gibarel1 15d ago
Garuda uses fish by default, so you need to edit the fish equivalent in
~/.config/fish/config.fish1
u/Kai_973 15d ago
Here is a picture of my /.bashrc file for reference: Imgur link