Reputation: 18552
How can I make eshell autocomplete behave like Bash and Emacs in general i.e. it offers a list of choices rather than arbitrary selects one for you?
For example, if I have two directories "Download" and "Downloads", when I type "Down" and hit TAB, I expect another buffer pops up and shows me the choices. But eshell just completes it for me, i.e. if I press TAB, it completes to "Download"; hit TAB again, it changes to "Downloads".
Upvotes: 14
Views: 5068
Reputation: 9333
You only need to have the following line:
(setq eshell-cmpl-cycle-completions nil)
eshell-mode
automatically set pcomplete-cycle-completions
to the value of eshell-cmpl-cycle-completions
locally.
Upvotes: 3
Reputation: 3886
(add-hook
'eshell-mode-hook
(lambda ()
(setq pcomplete-cycle-completions nil)))
and
(setq eshell-cmpl-cycle-completions nil)
Both do as you ask and show a buffer listing the completions when I run my emacs as 'emacs -q' to avoid my own customizations. This is with emacs 23.3, are you running a much older version?
Also see http://www.emacswiki.org/emacs/EshellCompletion which is where I first went to check this out.
Steps to try this out:
Upvotes: 6
Reputation: 20342
Use this:
(add-hook
'eshell-mode-hook
(lambda ()
(setq pcomplete-cycle-completions nil)))
Upvotes: 6