It seems that the single-quotes in your ~/.zshrc
are not recognized as such and thus zsh assumes that two aliases are given: The definition of dir='cd
and a query of ~/Desktop/somedir'
instead of dir='cd ~/Desktop/somedir'
. (zsh allows for multiple alias definitons and queries in one command)
Most likely the single quotes you are using are not '
from ASCII (ASCII code 0x27
) but some Unicode representation. Depending on your editor it is possible that they got replaced automatically when you edited your ~/.zshrc
. To be sure use an text editor that doesn't do any such 'auto-magic' (unless you tell it). I think of nano
, vim
and/or emacs
are available on recent OS X versions.