help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs and ls with cygwin


From: Dan Davison
Subject: Re: emacs and ls with cygwin
Date: Tue, 13 Apr 2010 01:43:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Oren Cheyette <ocheyette@gmail.com> writes:

> I'm using GNU Emacs 23.1.50.1 on Win32 (XP) with cygwin tcsh as the shell
> invoked by the "shell" command. I have this setup on several computers bought
> and set up at different times, and most recently I'm finding that the command
> "ls" produces garbage output full of control characters, like this:
> [0m[01;34mMy Documents[0m
> [01;34mNotes[0m
> [01;32mTestingrecycle.doc[0m
> [01;34mWINDOWS[0m
>
> I see nothing in any of the faq's about how to deal with this. Suggestions?

Hi Oren,

The control characters are to do with creating coloured output of ls.
If you create a file in your home directory containing shell commands
called ~/.emacs_tcsh, then emacs shell will execute those commands when
it sets up the shell environment. So you want to put commands in there
which ensure that ls uses the --color=never option (or --color=none, or
whatever it is on your system). I don't use tcsh, but something like

alias ls 'ls --color=never'

Also note that people sometimes put special control characters in their
prompts, so you may also want to set the value of $PS1 and $PS2 in
~/.emacs_tcsh.

Dan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]