Try putting this code in your ~/.emacs
startup file (and restarting Emacs):
(setq shell-file-name "bash" explicit-shell-file-name "bash")
You could also temporarilly rename /bin/sh
to /bin/sh.hold
to be absolutely certain whether Emacs is invoking /bin/sh
or /bin/bash
. Keep in mind that in certain cases (see the Bash man page) Bash will behave as sh depending on how it is invoked (e.g., if argv[0]
is "sh").