# HG changeset patch # User Oleksandr Gavenko # Date 1272290742 -10800 # Node ID c7a4c56c60ec3c6d5cf3369289dafb751f2bbd0c # Parent 7340a863ae23fb64945706193956c336a596b168 Set shell under Windows to Cygwin/MSYS sh. diff -r 7340a863ae23 -r c7a4c56c60ec .emacs-my --- a/.emacs-my Mon Apr 26 17:04:33 2010 +0300 +++ b/.emacs-my Mon Apr 26 17:05:42 2010 +0300 @@ -635,15 +635,20 @@ commands. If nil, 'sh' will be used." ) (when (eq window-system 'w32) ; may require Cygwin or MSYS - (setenv "ESHELL" "bash") - (when my-use-windows-shell - ;; Restore shell name if user set SHELL env var for Cygwin/MSYS. - (setq shell-file-name (concat exec-directory "cmdproxy.exe")) - ;; Here is workaround: when explicit-shell-file-name is "bash" and shell-file-name is "cmdproxy.exe" - ;; find-dired incorrect quote args (in shell-quote-argument (w32-shell-name) return "bash", but - ;; shell-command used shell-file-name which value "cmdproxy.exe"). So I put additional space in pattern to - ;; prevent quoting. - (setq find-ls-option '("-exec ls -ld {} ;" . "-ld")) + (if my-use-windows-shell + (prog + ;; Restore shell name if user set SHELL env var for Cygwin/MSYS. + (setq shell-file-name (concat exec-directory "cmdproxy.exe")) + ;; Here is workaround: when explicit-shell-file-name is "bash" and shell-file-name is "cmdproxy.exe" + ;; find-dired incorrect quote args (in shell-quote-argument (w32-shell-name) return "bash", but + ;; shell-command used shell-file-name which value "cmdproxy.exe"). So I put additional space in pattern to + ;; prevent quoting. + (setq find-ls-option '("-exec ls -ld {} ;" . "-ld")) + ) + (prog + ;; Use shell from Cygwin/MinGW. + (setq shell-file-name "sh") + ) ) ;; (setq explicit-shell-file-name "bash") (setq explicit-bash-args '("-i"))