Hacker News new | ask | show | jobs
by a3n 1886 days ago
> Maybe less well-known is that ~ is an alias for one’s home directory.

And ~mylogin is another alias for ones home directory.

And more generally, ~otherdev is an alias for otherdev's home directory.

1 comments

This is accomplished with the zsh hash table I believe. `hash -d myproject=~/projects/myproject` will set up the same thing for ~/projects/myproject

$ cd ~myproject

$ pwd

~/projects/myproject