(I think I sent this one prematurely once already; sorry.) Glenn Morris writes: > This issue occurs since at least Emacs 21.1. > If you have a non-empty ~/.emacs_bash file, eg one that contains just: > > #comment > > and do M-x shell with the bash shell, then you get an extra N copies of > your prompt, as the N lines of ~/.emacs_bash are fed to the shell by > comint-exec. This bug is still present in Emacs 28, although it looks a bit different now: