How to symlink alias and function dotfiles

379 Views Asked by At

I trying to make my own alises. I have this in my ~/dotfiles:

alias hello="echo Hello"

I try to symlink this:

ln -sn "~/dotfiles/.alias" ~

But after this when i run my alias nothing happens Is there a path for aliases in home to symlink it?

1

There are 1 best solutions below

0
omagdy7 On BEST ANSWER

Make sure you are sourcing your aliases file in your .bashrc or .zshrc

the code for that in your .bashrc or .zshrc should look something like this:

if [ -f ~/dotfiles/.aliases ];
then source ~/dotfiles/.aliases
fi