Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

what I would like to do is

when I write inside on console a command, for example.

ls

file1.txt folder1 folder2

then I write

cd (I hit some magic shortcut and I can access using down button first file1.text. when I click it again I see "cd folder1" when I hit it again I see "cd folder2".

is it possible?

I do know there is auto-complete with tab, but that is not what I want.

share|improve this question
add comment

1 Answer

Perhaps you want to try readline's menu-complete for tab-completion?

Try it in an interactive bash session by running

bind '"\C-i": menu-complete'

Then try typing cd followed by a space, then the tab key multiple times.

To make it permanent, put the following line in ~/.inputrc (the file does not exist by default):

"\C-i": menu-complete
share|improve this answer
add comment

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.