0

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?

2
  • 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, 2014 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, 2014 at 22:12

1 Answer 1

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

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .