Simplify zsh's directory history
1. Add this function to your .zshrc
function xd() {
  if [ -z "$1" ]
  then
    dirs -v
  else
    ~$1
  fi
}
2. Reload it
$ . ~/.zsh
3. Awesome!
Move around
$ cd foo
Use xd to view your history
$ xd
0    ~/foo
1    ~
Add a number to to change your current directory
$ xd 0
$ pwd
~Written by Leon
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
 #Shell 
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#