Skip to main content
Post Made Community Wiki
Source Link
Michael Mrozek
  • 95.8k
  • 40
  • 245
  • 236

One of my all-time favorite ZSH features is named directories. You can export a variable with a given name, with a value that points to a certain path:

export foo=/usr/bin 

Now you can use ~foo in a command to refer to /usr/bin:

cd ~foo ~foo/ls cat ~foo/filename