Skip to main content
2 of 3
edited tags
Gilles 'SO- stop being evil'
  • 865.9k
  • 205
  • 1.8k
  • 2.3k

Is it possible for bash/readline to "clean up" completion suggestions out the terminal?

If you are using zsh and do a tab completion for commands, pathnames, options etc, whenever there are multiple potential matches the suggestions will be displayed below the prompt.
Once you chose a suggestion zsh will remove the list of suggestions out of the terminal, as you can see here:

enter image description here

Image source

By default when bash offers completion suggestions it outputs the list and returns you to a new prompt.

enter image description here

Image source
The zsh behaviour is preferable to me as the suggestions I never used offer no value and just produce more "noise" in the terminal.
Is it possible to configure bash/readline to behave like zsh in this way?

the_velour_fog
  • 12.8k
  • 17
  • 73
  • 115