25

I just downloaded oh-my-zsh and found out that 'd' has been taken over by some command I do not know. Does anybody know what the output from this is?

0   ~/Desktop/Dropbox/project_Sites/rails_app/app/views/static_pages
1   ~/Desktop/Dropbox/project_Sites/rails_app/app/views
2   ~/Desktop/Dropbox/project_Sites/rails_app
3   ~/Desktop/Dropbox/project_Sites
4   ~/Desktop/Dropbox
5   ~
6   ~/.oh-my-zsh
7   ~/.oh-my-zsh/plugins
8   ~/.oh-my-zsh/plugins/rails
9   ~/.oh-my-zsh/lib
ovatsug25
  • 401

2 Answers2

29

The d command is a function defined in directories.zsh. It lists the recently visited directories, which you can navigate to directly using the number aliases defined in the same file. So for example:

➜  ~/.oh-my-zsh/plugins (master) ✗ d
0   ~/.oh-my-zsh/plugins
1   ~/.oh-my-zsh
2   ~/.oh-my-zsh/lib
3   ~
➜  ~/.oh-my-zsh/plugins (master) ✗ 2
~/.oh-my-zsh/lib
➜  ~/.oh-my-zsh/lib (master) ✗
hvrauhal
  • 393
12

Looks like a history of most recent directories you've been in. which d identifies it as an alias to dirs shell builtin, which prints the contents of the directory stack. Just tried it and number keys allow to move to respective directory. Cool feature :)