20

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
3
  • I didn't know that oh-my-zsh did any such thing. If it is reproducible then this is an interesting question.
    – nikhil
    Jul 25 '12 at 20:00
  • Just for the benefit of those who don't know what oh-my-zsh is - is it this?
    – Journeyman Geek
    Jul 26 '12 at 12:08
  • yes @JourneymanGeek it is that.
    – ovatsug25
    Jul 27 '12 at 1:18
8

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 :)

23

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) ✗

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.