Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

In bash, when I hit tab and the completion is ambiguous, it appears like this on my screen:

chris@host / $ cd fo
foo/ for/ foz/
chris@host / $ cd fo

I then continue typing, but I get to another completion:

chris@host / $ cd fo
foo/ for/ foz/
chris@host / $ cd foo/ba
bar/ bat/
chris@host / $ cd foo/ba

And another:

chris@host / $ cd fo
foo/ for/ foz/
chris@host / $ cd foo/ba
bar/ bat/
chris@host / $ cd foo/bar/ba
bad/ bay/ baz
chris@host / $ cd foo/bar/baz
chris@host /foo/bar/baz $

I'm left with a bunch of completion suggestions in my terminal history, which to me is clutter that I don't want. In zsh this does not happen -- once you're finished with a suggestion, it disappears from the terminal, and all you see is:

chris@host / $ cd foo/bar/baz
chris@host /foo/bar/baz $

Is there any way to get bash to act similarly or is this a zsh-only thing?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

As far as I'm aware that's just how bash works.
If you prefer the zsh behavior, use zsh.

(The wonderful thing about standard shells is there are so many to choose from!)

share|improve this answer

Your Answer

 
discard

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.