Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

I had this on my Ubuntu setup and since I switched to Fedora I want to set it and I forgot how... The idea is simple :

I don't want the terminal to show me suggestions when I double tab, instead I want it to cycle through every possible suggestion with each press on tab... this can be done in Vim also.

So when I type gedit a and press tab it will show me every file with a first letter a.

share|improve this question
up vote 22 down vote accepted

This is actually a readline feature called menu-complete . You can bind it to tab (replacing the default complete) by running:

bind TAB:menu-complete

You probably want to add that to your ~/.bashrc. Alternatively, you could configure it for all readline completions (not just bash) in ~/.inputrc.

You may also find bind -p (show current bindings, note that shows tab as "\C-i") and bind -l (list all functions that can be bound) useful, as well as the bash manual's line editing section and readline's documentation.

share|improve this answer
Can i combine 2 methods of autocompleting (the list and inline) and thanks for the answer :) – vanjadjurdjevic Nov 12 '11 at 0:44
@vanjadjurdjevic: Sure, just bind them to different keys. – derobert Nov 12 '11 at 9:51
thank you very much. – vanjadjurdjevic Nov 12 '11 at 13:56
menu-complete is cool, but it hides the list of all possible suggestions ;-( Is it possible to both see the list and cycle through options? – Ciro Santilli 巴拿馬文件 六四事件 法轮功 Mar 6 at 10:39
@CiroSantilli六四事件法轮功包卓轩 I also like this feature in readline based shells. Currently the zsh way to do it is very cool: first hit of tab shows all possibilities, second hit of tab starts cycling the completion items. – xuhdev Mar 19 at 22:44

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.