[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help with M-x term
From: |
Tim X |
Subject: |
Re: help with M-x term |
Date: |
Fri, 14 Jul 2006 15:25:54 +1000 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
op132650c@mail.telepac.pt writes:
>> Is there some reason why you aren't using M-x shell?
>
> I don't want to detour the attention about the question of William Daffer,
> but i
> also prefer M-x term instead of M-x shell, because the output of M-x shell is
> not well formatted compared to M-x term.
>
> Now i put the following question:
>
> What's the difference between M-x shell and M-x term?
>
> How can i configure M-x shell to be well formatted?
>
> One example of the bad formatation of the output of M-x shell, is when i do ls
> -la.
> I get the following:
>
> ]]] file1 ]]] file3^]]] ]]] file5^]]]
> ]]] file2 ]]] file4^]]] ]]] file6^]]]
>
>
> With the M-x term i get well formatted:
>
> file1 file3 file5
> file2 file4 file6
>
The difference in 'formatting' you have observed is because M-x shell
doesn't understand ANSI escape codes for colour. When you use the ls
command and have it configured to display the output using different
colours for different file types, it does this by using andsi colour
escape sequences. However, M-x shell does not understand these "out of
the box".
There are at least two solutions -
1. configure ls not to use escape sequences when displaying a
directory listing in a dumb terminal - one of the ls --color=
values should do this
2. Enable support for ansi colours in comint derived modes - do an
apropos for ansi color. M-x shell will then be able to interpret
the ansi colour codes.
3. Use M-x term
Tim
--
tcross (at) rapttech dot com dot au
Re: help with M-x term, Kevin Rodgers, 2006/07/13