2
votes

When doing tab-completion within bash (e.g. cd dir_ <TAB>), subsequent hits of Tab cause the list of matching options to be re-printed, once per hit of the Tab key (picture below). Each new line is me hitting Tab once, and the options (and prompt) re-printed.

bash tab completion

Now, in zsh for example, this behavior is disabled. In the picture below, I have typed cd dir_ and then hit tab REPEATEDLY. As desired, the prompt and the available completion options do not re-print, but just stay as-is, below the current prompt.

zsh tab completio

Is this at all possible with bash? The screen filling up with all the options when repeatedly hitting Tab is quite annoying.

EDIT
3 years later and i'm happy to report i'm finally using zsh and this is no longer bugging me

Is the repeat printing of the prompt "test_dir $ " and of the command "cd dir_" also caused by the TAB key being pressed? - Roadowl
(don't repeatedly press tab...) Tab completion is usually configurable. However, this is not a programming question and should be posted to either Super User or Unix & Linux for proper answer. - David C. Rankin
Zsh's completion is far more advanced than Bash's. Bash can never print the completion candidates without moving the cursor (that's to say without reprinting the prompt). - user8680478
bash does not have a global setting for this but it can be achieved in a per-command way which is obviously not practical for use. - pynexj
@shellter ok, thanks. I wasn't sure which site to post it on, searched before posting and found a bunch of bash questions here, figured i'd just put it here. - K Raphael