[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] pager support for command line client

From: Ben Reser <ben_at_reser.org>
Date: Mon, 03 Feb 2014 23:36:15 -0800

On 2/3/14, 12:02 PM, Stefan Sperling wrote:
> Below is a very simple proof of concept patch that enables a
> pager for 'help', 'diff', and 'blame'. Currently it only looks
> for a PAGER or SVN_PAGER environment variable. My plan is to
> also add a 'pager-cmd' option for this purpose.

I suspect we should allow the pager to be used with all our commands, though
most of them should be disabled by default. I'd say the following should be
enabled by default:
blame
cat
diff
list
log
mergeinfo (at least with --show-revs)
proplist
status

A lot of these will make a lot more sense if we can reasonably default to
something like the FRSX option set that git passes to less by default. They do
this by setting the LESS environment variable (if not already set and the pager
has no arguments). In our case I'd suggest FX. I guess R doesn't do much for
us at this point since we don't emit color codes and S seems like a bad idea
for a default.

Branko convinced me that we should default to less (or more on Windows) if
PAGER and SVN_PAGER is missing.

So I'd like to see the following configuration:
[helpers]
enable-pager=yes|no (defaults to yes)
pager-cmd=command [args] (defaults to SVN_PAGER, or PAGER or configure time choice)

[blame]
enable-pager=default|yes|no (default uses whatever yes/no state is on the
helpers section)
pager-cmd=command [args] (defaults to whatever the configuration of the helpers
section was)

and so on for additional sub-commands. If there are objections to putting this
in ~/.subversion/config we could put it in ~/.subversion/cmdline to make it
clear these are really for our command line client and not everything else.

Part of the reason for each sub command being configurable is so you can do
things like pagers that colorize output and what not (e.g. things like grc).
Received on 2014-02-04 08:37:00 CET

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.