How can I run Cygwin Bash Shell from within Emacs?

后端 未结 8 1630
温柔的废话
温柔的废话 2020-12-01 01:34

I am running GNU Emacs on Windows so entering:

M-x shell

launches the Windows command-line DOS shell. However, I would like to instead be a

8条回答
  •  春和景丽
    2020-12-01 01:50

    I use XEmacs with Cygwin, and can run bash from XEmacs relatively easily.

    Here's the relevant section from init.el

    ;; Let's use CYGWIN bash...
    ;;
    (setq binary-process-input t) 
    (setq w32-quote-process-args ?\") 
    (setq shell-file-name "bash") ;; or sh if you rename your bash executable to sh. 
    (setenv "SHELL" shell-file-name) 
    (setq explicit-shell-file-name shell-file-name) 
    (setq explicit-sh-args '("-login" "-i"))
    

提交回复
热议问题