Zsh named directories

Zsh has a useful feature called Named directories.

Usage is simple, you can define it with hash command:

hash -d my_dir=/home/user/some/deep/directory/structure

Now you can use it like normal directory, just add prefix \~:

cd ~my_dir
cp ~my_dir/file.txt /other_dir/

Useful tools / links