I'm having the same problem as asked in this question: emacs is dropping into shell-script
mode, but for the wrong shell variant.
Using a shebang as suggested in that question's answer is semantically incorrect: most of my files are meant to be sourced, rather than run. The same applies for adding file extensions.
Normally, I use the mode file-local variable:
# -*- mode: shell-script; -*-
but this always drops me into shell-script[bash]
mode. Is there any way to force tcsh
, csh
, bash
, or sh
modes with a file-local variable?
Minor sub-question: is there a specific name for modes that distinguish between specific shell flavors? Not knowing the right verbiage makes this tough to Google.
shell-script
mode is the same assh-mode
, then, I think, the variable you are looking for issh-shell-file
..tcsh
?