Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Say I am in a directory code:

/code
    /very-long-and-descriptive-name

If I want to cd into that directory (or a directory if it comes first in alphabetical order), I can just cd *.

Now say I add more directories and files to code:

/code
    ACKNOWLEDGEMENTS.md
    /a-very-long-directory-name
    /super-long-name-that-is-quite-long
    README.md
    /very-long-and-descriptive-name

Is there a way that I can cd into the (alphabetically ordered) first (a-very), 2nd (super-long) or third (very-long) directory quickly?

Like cd */ 1, cd */ 2, cd */ 3?

share|improve this question
1  
If you use tab key, it should try to auto-complete. So if you type a and tab, it will expand into a-very-long.., s and tab into super-long..., etc. –  NuTTyX Aug 11 at 22:06
    
Wow. I did not know that at all and it solves the issue, so if you make that an answer, I would accept it. –  Blue Ice Aug 11 at 22:12

1 Answer 1

up vote 1 down vote accepted

If you use tab key, it should try to auto-complete. So if you type a and tab, it will expand into a-very-long.., s and tab into super-long..., etc

share|improve this answer
    
Thanks... and sorry for the XY problem :) –  Blue Ice Aug 11 at 22:30

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.