Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am working on Zsh 5.0.2 (latest stable version), and I noticed that:

dirs -v

and

cd -<TAB>

show a different list of directories (or at least directories in different order).

Moreover, it seems as if cd - shows oldest directories at the top, with the more recent directories at the bottom (exactly the opposite of what I want)

Why are these lists different and how can I change the options of these lists?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You are moving from the right(to left) of the directory stack when using -. where as dirs -v prints the directory stack,in a list, from the left(to right). If you were to cd +<TAB> the completion would show in the same order as dirs -v. Using dirs without options, would give a more accurate visual representation of the stack and how you are rotating it with pushd & popd. If the pushd_minus option is set, the context of - and + are swapped. man zshbuiltins and look for pushd for more information.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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