monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] colorization


From: Timothy Brownawell
Subject: Re: [Monotone-devel] colorization
Date: Sun, 12 Apr 2015 14:15:11 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:34.0) Gecko/20100101 Icedove/34.0

On 04/12/2015 01:59 PM, Markus Wanner wrote:
Other colorized commands will output the colorization codes if
specifically asked, even to pipes.
That in turn surprises me.

     $ mtn diff --colorize | cat

gives monochrome output for me. What specific command and OS do you use?

Oops, I meant "other" as in "not monotone". With my example being "ls" (which I have the GNU coreutils version, on current Debian testing).

If --colorize is given explicitly, I'd think it should colorize
regardless of what it thinks the output type is.
I see your point. And it seems that would be more consistent with how
'--ticker' works as well. I'll change that. Thanks for your input.

The same argument could be applied for '--pager', though, where I have a
bit of a hard time coming up with a valid use case.

Hm... --pager in general is a bit odd really, but maybe I'm just too comfortable with unix pipelines.

--pager means, send the output thru this other program instead of to normal STDOUT. Which does not make sense if STDOUT is being captured, which can be approximated by STDOUT not being a smart terminal.

It also doesn't make much sense to give --pager explicitly, since piping to your paging program does the same thing and is more consistent with the rest of the world. Unless you're on Windows I guess?

That's a use case. Have --pager be a GUI program (notepad, whatever), which doesn't output thru your terminal. In which case you probably want it *especially* if your terminal isn't smart.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]