* lisp/files.el (insert-directory): Don't hardcode "-c".
* lisp/term.el (term, ansi-term): Use shell-file-name.
;; See eg dired-safe-switches-p.
(call-process
shell-file-name nil t nil
- "-c"
+ shell-command-switch
(concat (if (memq system-type '(ms-dos windows-nt))
""
"\\") ; Disregard Unix shell aliases!
:group 'shell-directories)
(defcustom explicit-shell-file-name nil
- "If non-nil, is file name to use for explicitly requested inferior shell."
+ "If non-nil, is file name to use for explicitly requested inferior shell.
+When nil, such interactive shell sessions fallback to using either
+the shell specified in $ESHELL or in `shell-file-name'."
:type '(choice (const :tag "None" nil) file)
:group 'shell)
(interactive (list (read-from-minibuffer "Run program: "
(or explicit-shell-file-name
(getenv "ESHELL")
- (getenv "SHELL")
- "/bin/sh"))))
+ shell-file-name))))
(set-buffer (make-term "terminal" program))
(term-mode)
(term-char-mode)
(interactive (list (read-from-minibuffer "Run program: "
(or explicit-shell-file-name
(getenv "ESHELL")
- (getenv "SHELL")
- "/bin/sh"))))
+ shell-file-name))))
;; Pick the name of the new buffer.
(setq term-ansi-buffer-name