Fixed M-x shell in Mingw Emacs, Bash "-i" is not supported in dumb Emacs terminal.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sat, 10 Dec 2022 18:34:57 +0200
changeset 1765 5cabf87dd450
parent 1764 a40a9f231aa0
child 1766 407c95f4887f
Fixed M-x shell in Mingw Emacs, Bash "-i" is not supported in dumb Emacs terminal. bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell tput: unknown terminal "emacs"
.emacs-my
--- a/.emacs-my	Mon Nov 28 23:05:00 2022 +0200
+++ b/.emacs-my	Sat Dec 10 18:34:57 2022 +0200
@@ -571,7 +571,11 @@
 
 (cl-eval-when (compile) (require 'shell))
 
-(setq explicit-bash-args '("-i"))
+(setq explicit-bash-args
+      (if (eq system-type 'windows-nt)
+          ;; https://emacs.stackexchange.com/questions/71487/mingw-shell-in-emacs/
+          (list "--login")
+        (list "-i")))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (message "Cygwin, MSYS")