However, before Troy
fixed it for me, tab-completion in
shell-mode wasn’t quite the same experience
as the one on a separate terminal emulator. To be honest, I didn’t investigate
far enough to understand whether this was due to my Bash configuration or to
Emacs itself. The only thing I know is that Troy’s package got me where I wanted
On MELPA you will find two packages:
company-native-complete. I use both, but if you are not a Company user you can
live with the former alone.
Anyway, I set up
native-complete with a hook to
shell-mode that runs
native-complete-setup-bash, then another hook adds
company-backends. Tom explained everything you need to start and other
useful details in the package README, so head over there for more details. The
only thing I can add is that I have TAB
Now that there is a libvterm
integration for Emacs, staying with
shell-mode may sound anachronistic, because proper terminal emulation with
your favourite shell is just a package away. But if you, like me, are happy with
shell-mode, I can’t recommend
company-native-complete enough. By the way, Troy’s work supports
other fancy things too, so you’re not strictly limited to Bash.
Next time we will see highlights disappear suddenly. Is the Evil Genius2 operating my Emacs? Who knows.