Ah, but the real reason is that you started bash from inside a CMD window. Start it directly by adding these lines to site-start.el
;;; shell on windows to bash (make-local-variable 'cygwin) (make-local-variable 'cygwin-bin) (make-local-variable 'cygwin-bash) (setq cygwin (concat where "cygwin")) (setq cygwin-bin (concat cygwin "/bin")) (setq cygwin-bash (concat cygwin-bin "/bash.exe")) (setenv "SHELL" cygwin-bash) (setq shell-file-name cygwin-bash) (setenv "CVS_RSH" (concat cygwin-bin "/ssh.exe"))