Piping copious output to PAGER automatically.
From: David Wilson <dw_at_botanicus.net>
Date: 2004-09-03 15:46:23 CEST
Hi there,
First and foremost, congratulations on an excellent product. It is rare
In #svn today, I suggested the addition of a feature which provoked a
Basically, in 99% of cases (and probably closer to 100% with
My basic idea is to test for something like the following or it's APR
(isatty(fileno(stdout)) && (pager = getenv("PAGER")) && *pager)
If the condition succeeds, then use popen(3) (or the APR equivalent) to
The condition will fail if output is redirected to a file, for example,
I first came across this function in Rick Faith's dict.org client
I feel it is rational behaviour since already the svn client behaves
It isn't trying to be too smart as the user is asking all his system
The user has the choice of two overrides, namely:
svn diff|cat
Both of which will cause the test to fail.
A more conservative but less portable approach would be to query
Affected commands:
svn cat
I am willing to provide a patch for the functionality, which would amount
Thanks for your time,
David.
-- "Science is what we understand well enough to explain to a computer. Art is everything else we do." -- Donald Knuth --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org For additional commands, e-mail: dev-help@subversion.tigris.orgReceived on Fri Sep 3 15:46:40 2004 |
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.