I am running Cygwin as an Inferior Shell in Emacs. Here's the basic step I am following:
- C-u M-x shell (rename the buffer to cygwin)
- cd \cygwin
- cygwin.bat
Here's what I see:
C:\cygwin>cygwin cygwin ]0;~ [32muser1@mymachine [33m~[0m $
If I run cygwin.bat outside of emacs, it gives me:
user1@mymachine ~ $
I could almost deal with the extra characters, but when I try ls here's the result:
$ ls bash: $'ls\r': command not found
I must be doing something wrong. Any suggestions?
EDIT: M-x ansi-color-for-comint-mode-on fixed the prompt, but the system is still not able to decode the ls command.
Best Answer
Here's the fix for the unix linefeed junk: http://osdir.com/ml/emacs.windows/2007-12/msg00007.html
Basically, just run:
with 'undecided-unix and 'undecided-unix parameters.
Also, change the prompt to be:
The default PS1 causes ugly errors.