I had less in mind when thinking about this, but I suppose any pager. There's also filter programs like nl and ts that just annotate their input - a whitelist approach would probably work pretty well. One idea I kind of like is modifying ack to detect if it's talking to another ack, and having the second ack change its color to highlight different patterns in the output.
Looking through my notes on this, there's a lot of potential application beyond color - you could have a program tell another what encoding it's using (hey, my input is UTF-16LE!) so it doesn't need to guess, or you could have an implementation of uniq that checks to see if its input is coming from sort or not.
I had
less
in mind when thinking about this, but I suppose any pager. There's also filter programs likenl
andts
that just annotate their input - a whitelist approach would probably work pretty well. One idea I kind of like is modifyingack
to detect if it's talking to anotherack
, and having the secondack
change its color to highlight different patterns in the output.Looking through my notes on this, there's a lot of potential application beyond color - you could have a program tell another what encoding it's using (hey, my input is UTF-16LE!) so it doesn't need to guess, or you could have an implementation of
uniq
that checks to see if its input is coming fromsort
or not.Omg, I never knew about
less -R
!!