Linux – Sourcing an alias file in oh the zsh custom/ folder

arch linuxoh-my-zshshellzsh

I am trying to use the aliases defined in my ~/.aliases file in my zsh with oh-my-zsh installation. The documentation suggested that aliases/functions/ etc. should go in .oh-my-zsh/custom/ as files with a .zsh extension.

I can make a file of aliases there using the keyword "alias" as normal. However, when I try making a file with the line "source ~/.aliases" — this does not work.

What is the best way to go about this? Should I ditch the recommendation to use the oh-my-zsh/custom/ folder and instead source from .zshrc ?

Best Answer

You should just symlink your main file in the custom dir.

ln -s ~/.aliases ~/.oh-my-zsh/custom/aliases.zsh
Related Question