Re: [PATCH] pager support for command line client
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 4 Feb 2014 12:37:45 +0000 (GMT)
Stefan Sperling wrote:
> Ben Reser wrote:
I do like the idea of making the output more user-friendly by using a pager. But keep it simple. A pager by default just for help -- fine. A pager for all commands when producing more than a screenful of output -- fine. A static list of what commands we 'believe' will produce a lot of output -- no.
The pager should not be used when stdout is not connected to a terminal, of course.
> Or we could buffer up to one screenfull of data and decide to use the
Good behaviour, but don't implement it in Subversion, implement it in the pager! GNU 'less' already has this feature built in. If Windows/BSD/whatever doesn't have such a pager by default, the Subversion packager should provide one. In the extreme, I'd rather see us write one and ship it as a tool than build such functionality into 'svn' itself.
>> A lot of these will make a lot more sense if we can reasonably default to
For those without a copy of 'man less' in front of them:
-F or --quit-if-one-screen
-R or --RAW-CONTROL-CHARS
-S or --chop-long-lines
-X or --no-init
> less -F is causing issues for me, where I don't see any output at all if
Do you see the same problem if you pipe the output from (non-patched) 'svn' straight into the same pager? Could it be related to '-X'? Could it be related to the sequence in which we close things:
close the svn_cmdline_stream_for_stdout
See the 'flush' call in 'main()' -- wouldn't it make more sense to set up and tear down the pager there, rather than within each individual subcommand?
- Julian
|
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.