I have the following in my .zshrc
alias la="ls -als"
And it's being overwritten
▶︎ which la
la: aliased to ls -lAh
Why is this happening / where might it be coming from?
Helped largely by https://stackoverflow.com/a/26742455/413254, it turns out that oh-my-zsh has some built in directory aliases in ~/.oh-my-zsh/lib/directories.zsh
one of which overwrote my custom one!
▶︎ cat directories.zsh
# Changing/making/removing directory
...
# List directory contents
alias lsa='ls -lah'
alias l='ls -lah'
alias ll='ls -lh'
alias la='ls -lAh'
You could resolve this in a few ways:
la
alias to something else.oh-my-zsh
filesource $ZSH/oh-my-zsh.sh
in my .zshrc
. That source $ZSH/oh-my-zsh.sh
sources basically everything in .oh-my-zsh/lib
I went with the last option.