Search code examples
macoszshzshrc

how can I make an alias pointing to a link in zsh-shell (on mac)


I'm trying to make this in my .zshrc-file:

alias fer='/Documents/hej'

But I'm getting this when I run the alias

cd:cd:13: no such file or directory: /Users/yoniPacheko/Documents/hej

it seems like syntax is wrong right?


Solution

  • Ok guys I did it!

    WEll it depends where u want to point to.

    The right answer to this question is:

    alias fer='~/hej'
    

    Apparently the zsh adds the rest.

    Now if u want to point to a directory more far away, inside the USER-account it'll work pasting the whole link, for instance:

    alias fer='~/Documents/tutorials/ruby/RnR/third_course_0/projects'