Use less -R to preserve color escape sequences when paging in less.
ls --color=auto | less -R
we'd see no color. Instead we can run ls under expect: expect -c "spawn -noecho ls --color=auto; expect" | less -R
and color abounds.There may be an easier way to accomplish this. If anybody has ideas, chime in.
Thanks a bunch for pointing me towards `expect`, though! I hadn't used it before, and I'll definitely do some experimenting with it to see if I can get my desired output with it.