Re: colorization

Markus Wanner <[email protected]>
Newsgroups gmane.comp.version-control.monotone.devel
Message-ID <[email protected]>
On 04/12/2015 09:15 PM, Timothy Brownawell wrote:
> Oops, I meant "other" as in "not monotone". With my example being "ls"
> (which I have the GNU coreutils version, on current Debian testing).

Oh, I see, that makes more sense, now. And yes, I agree, it's a good
idea to be consistent with other unix commands like ls, here.

>>> 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.

Changed and committed. Now, on a smart terminal, the following two are
equivalent:

    $ mtn diff
    $ mtn diff --colorize | less -FRX

>> 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.

Well, it IS a unix pipe at work, there. ;-)

Admittedly, that feature is inspired by git. The first time git offered
me a pager, I was surprised. By now, I'm so used to it that appending "|
less" to many of the mtn commands started to itch. I scratched.

> --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.

Correct.

> It also doesn't make much sense to give --pager explicitly,

Exactly.

> 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?

I'm not. Nor does this feature work on Windows, sorry. (Neither
colorization nor piping to a pager, to be specific.)

> 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.

Such a program would need to be able to read from stdin, but not write
to stdout. AFAIUI emacsclient, for example, cannot do that. Are you
aware of any such program?

In any case, I also changed --pager to always, unconditionally pipe
through a pager program.

(More importantly, I should now make that pager program configurable.)

Regards

Markus

_______________________________________________
Monotone-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/monotone-devel
signature.asc (application/pgp-signature, 1.5 KB)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQQcBAEBCgAGBQJV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91nacSOtli73lo9dC
LmqBZ2CiJ+zuliVcT+EXkb3CgQZjXoFH3HgEp13z/qv8mwo8HEzLUMs/E80C2oGI
XTwpvpe8tlKEzSXrfWBQbAqtC6l9yU49QgE98X/kOUNwWbJtA5p7U/pq6nV2lVxk
0CGB84NJ/QF5uyWFGEFX0D68yqnyDX5NIPck1mgmNdSuPEM/ydjMZq1SOCeaQaq7
t6+HbPNKkk73JwRmt+NwIfeTrv5KXV8JZynlr68ZE1XrhzPmtB0pUvD1sKrXDlAu
SL//ITFAygNWZCUlATGSmPjRk64GCUeOEzKtUX3KStxnSkABnRZNG6dCflPLpfw=
=vtLa
-----END PGP SIGNATURE-----
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.