Mail Archives: djgpp/2000/09/27/14:45:27
Dear Hans-Bernhard:
Many thanks for the hint with the -r command! This does work perfectly
under Linux. I can even issue the command
ls --color=yes -l | less -r
and get the colors.
However, in DJGPP bash the -r command changes the ESC into a single
character (little arrow pointing left), i.e. the output looks like
<-[00m_bashrc<-[00m
where the <- is just one character.
I wonder whether this is a non implemented feature in DJGPP bash, or a
misconfiguration of some kind on my side.
Any advice?
Thanks a lot,
Wolfgang
--
Wolfgang Pölzleitner
sensotech Forschungs- und Entwicklungs GmbH
sensotech Research and Development
Scheigergasse 74, A-8010 Graz, Austria
T +43/316/429265, F +43/316/466037
e-mail: wp AT sensotech DOT at or polzleitner AT sensotech DOT at
Hans-Bernhard Broeker wrote:
>
> Wolfgang Polzleitner <wp AT sensotech DOT at> wrote:
>
> > I wanted to use ls with the color option, i.e.,
> > and pipe the resulting output into less, i.e.,
> > ls --color=yes -l | less
>
> > The first part gives me nice colored output as expected, but 'less' does
> > not display colors anymore. Instead it displays the escape characters
> > like ESC[00m_bashrcESC[00m.
>
> The key reason for this is that 'less' doesn't generally trust arbitrary
> files to be displayable without causing some mayhem to the terminal
> (making it unusable until reboot, or whatever) --- it's its Unix legacy
> shining through, here.
>
> That's why it will display Escape sequance literally, rather than just
> executing them. You can switch that off by typing
>
> -r<Return>
>
> while less is running.
>
> If that still doesn't work, that would mean 'less' doesn't have the
> terminal escape sequence treatment built into it that 'ls' and 'bash'
> have --- I don't have one here to check it.
> --
> Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
> Even if all the snow were burnt, ashes would remain.
- Raw text -