I'm running cygwin bash in shell mode in emacs, but I don't get any completions, is there a way to set it up?
1 Answer
There is a bash-completion package you can install to have this functionality.
The reason it doesn't work out of the box is that shell-mode doesn't send your input to the shell until you press RET, which calls the command comint-send-input. Unlike a terminal, when you press TAB, you are just calling Emacs's completion-at-point command, not interacting directly with shell.
If you don't want to install a package for this, you can try using term-mode or ansi-term-mode, which provide terminal interface features that allow bash completion to work. (But I am not sure how well these work with Cygwin.)
-
Thanks for the answer, I do use bash-completion package, my fault I didn't mention that in the question, it works fine on linux, but not on windows & cygwin, and I would like to use shell-mode, not term-mode.Sergey Kitov– Sergey Kitov2025-10-20 09:44:41 +00:00Commented Oct 20 at 9:44