I was wondering if there was an easier way to pick directories to cd
to within one's current directory.
For example, is there a way to just get a numbered list of the current directory and be able to do cd 1
, cd 2
, cd 3
, etc.
Is there some other way to easily cd
between sub directories in one's current directory?
Best Answer
If you set the
autocd
option in your~/.bashrc
you can change directories just by typing the name. Combined with Tab completion, you have only to type the first, unique characters and then hit Tab to move to your desired directory.From the manual:
Add the option to your
~/.bashrc
with:If you use Zsh, set the option with: