Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Whenever I use tab-completion, the list of possibilities is displayed and the prompt is duplicated below (| indicates the final cursor position):

$ vim ~/.<TAB>
./    ../    .bashrc    .vimrc
$ vim ~/.|

I would like the following, zsh-like behavior:

$ vim ~/.<TAB>|
./    ../    .bashrc    .vimrc

That is, show the suggestions below the old prompt. Old suggestions should be overwritten or vanish once I'm done completing instead of cluttering my screen.

Is this possible? If so, how?

share|improve this question

While bash does not have a perfect match for the zsh completion menu, you can cut down on screen clutter with menu-complete bindings in your .bashrc:

bind '\C-n:menu-complete'
bind '\C-p:menu-complete-previous'

These bindings cycle through completions on the commmand line with Ctrl+N and Ctrl+P (without showing the complete list). Your system may already have these keys bound; to check:

bind -p | grep 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.