Re: colorization

Timothy Brownawell <[email protected]>
Newsgroups gmane.comp.version-control.monotone.devel
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.