syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.58k stars 4.9k forks source link

[shell] Use explicit-shell-file-name and $ESHELL as default shells #16225

Closed bcc32 closed 6 months ago

bcc32 commented 6 months ago

M-x term and M-x ansi-term both check these two values before using shell-file-name. The description of the variable suggests that explicit-shell-file-name should be used for user-requested shells, whereas shell-file-name may be used (if different) for automatically spawned shells for things like compilation.

Since shell-pop is more like a wrapper around M-x term, it seems appropriate to check these variables first, the same way the interactive form of M-x term does.

bcc32 commented 6 months ago

Sorry, this is actually a mistake, since shell.el, which defines explicit-shell-file-name, is not loaded at this point.

I still think the fact that this layer setqs a defcustom like this is problematic, but I'm withdrawing this PR for now.