Click to See Complete Forum and Search --> : Piping --color attributes from ls to less (or more)...
per©oDåN
12-11-2000, 04:55 PM
Howdy... easy Q:
Probably no way to do it...
When I invoke
ls -a --color=tty |less -e
or
vdir -a --color=tty |less -e
The color attribs don't get passed through the pipe. Without writing some kind of preprocessor (as is outlined in the man for less), how can I force the color attribs to less (or more if less won't do it)?
anks,
-perc
Strike
12-11-2000, 06:37 PM
less doesn't handle escape sequences, so you just have to use more (though most might)
per©oDåN
12-11-2000, 10:34 PM
more won't (or doesn't as far as I can see) carry the colors over from stdout...
most? hrmm....
per©oDåN
12-12-2000, 03:30 PM
<float>
*would this kinda info be more readily available from the programming crew?*
Strike
12-12-2000, 04:22 PM
Maybe, maybe not. more doesn't display the colors correctly? Really? Wow, it always has for me. Try color=always instead of color=tty.
per©oDåN
12-12-2000, 04:50 PM
d00d! that did it... I wasn't thinking that it'd need that, but since it was passing it's stdout to a pipe...
ahhh *enlightement*
(not the desqtop, either)
THANKS MUCHO
NOW: if I could only get less to do the same thing...
(all the color tags come up as [ESC] around the affected output (dirs, execs, etc).
per©oDåN
12-12-2000, 04:52 PM
d00d! that did it... I wasn't thinking that it'd need that, but since it was passing it's stdout to a pipe...
ahhh *enlightement*
(not the desqtop, either)
THANKS MUCHO
NOW: if I could only get less to do the same thing...
(all the color tags come up as [ESC] around the affected output (dirs, execs, etc).
per©oDåN
12-12-2000, 04:53 PM
d00d! that did it... I wasn't thinking that it'd need that, but since it was passing it's stdout to a pipe...
ahhh *enlightement*
(not the desqtop, either)
THANKS MUCHO
NOW: if I could only get less to do the same thing...
(all the color tags come up as [ESC] around the affected output (dirs, execs, etc).
per©oDåN
12-12-2000, 04:54 PM
d00d! that did it... I wasn't thinking that it'd need that, but since it was passing it's stdout to a pipe...
ahhh *enlightement*
(not the desqtop, either)
THANKS MUY MUCHO
NOW: if I could only get less to do the same thing...
(all the color tags come up as [ESC] around the affected output (dirs, execs, etc).
per©oDåN
12-12-2000, 04:57 PM
d00d! that did it... I wasn't thinking that it'd need that, but since it was passing it's stdout to a pipe...
ahhh *enlightement*
(not the desqtop, either)
THANKS MUY MUCHO
NOW: if I could only get less to do the same thing...
(all the color tags come up as [ESC] around the affected output (dirs, execs, etc).
per©oDåN
12-12-2000, 05:07 PM
d00d! that did it... I wasn't thinking that it'd need that, but since it was passing it's stdout to a pipe...
ahhh *enlightement*
(not the desqtop, either)
THANKS MUY MUCHO
NOW: if I could only get less to do the same thing... *damitol!*
(all the color tags come up as [ESC] around the affected output (dirs, execs, etc)...
per©oDåN
12-12-2000, 05:08 PM
d00d! that did it... I wasn't thinking that it'd need that, but since it was passing it's stdout to a pipe...
ahhh *enlightement*
(not the desqtop, either)
THANKS MUY MUCHO
NOW: if I could only get less to do the same thing... *damitol!*
(all the color tags come up as [ESC] around the affected output (dirs, execs, etc)...
per©oDåN
12-12-2000, 05:15 PM
In case you can read this (I can't see any post after the 5th one above) I am not trying to BRB this thread or anything...
<someone just told me that my posts are making it to the board>
Strike
12-12-2000, 05:37 PM
Ha, yeah, I see like 5 or 6 of your replies. You're just trying to pad your post count, aren't you? You've got a ways to go, I believe I've officially passed spacial_K as the heaviest poster.
per©oDåN
12-12-2000, 06:06 PM
I definately believe it... and yours would outweigh most ppl here simply because so many of yours are actually topical/technical (not 92.3% Off-Topic posts, like mine).
Thanks agin (& sorry 'bout that er... um... extra postage)...