[darcs-users] darcs what output to pipes
andrew at operationaldynamics.com
Wed Mar 30 11:11:43 UTC 2005
[Just another wishlish thing; a recent thread prompted me to bring it
up. If the current behaviour is the result of a long-since decided
argument, then, "oh well"]
When you run `darcs whatsnew`, you get a tiny bit of ASCII colouring
(specifically, hunk,addfile,rmfile,... and friends) to make them blue
so they standout.
By its nature, the darcs what output can become is somewhat lengthy. Of
course, the solution is to pipe it to something like `less` to read it.
However, if you do `darcs what | less` it strips the control codes.
less has an option, -R, to make it ass through control codes. This has
the useful result of allowing ASCII colour escapes through, thus
resulting in colour output in the less screen. So
darcs what | less -R
is what I want to do... but is there a way I can tell darcs to not strip
the colour codes in pipes?
Given the existence of less -R, I would commend a change in darcs
behaviour to not deliberately strip such characters when stdout is
connected to a pipe, but if that's not going to happen, then is there an
option that I can persistently set to cause turn off stripping of
control characters in colourized darcs output?
Andrew Frederick Cowie
Technology strategy, managing change, establishing procedures,
and executing successful upgrades to mission critical business
Sydney New York Toronto London
More information about the darcs-users