Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

what I would like to do is

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


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

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

Your Answer


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.