[PATCH stable] pager: exec pager using /bin/sh -c
Augie Fackler
durin42 at gmail.com
Fri May 21 07:07:55 CDT 2010
On May 21, 2010, at 7:04 AM, Martin Geisler wrote:
> Brodie Rao <brodie at bitheap.org> writes:
>
>> # HG changeset patch
>> # User Brodie Rao <brodie at bitheap.org>
>> # Date 1274280852 18000
>> # Branch stable
>> # Node ID 9c655d72da80c45a843e213c247003860cb25f8b
>> # Parent b5c0f6a1143066c453032ab6dc4163ef52e932ee
>> pager: exec pager using /bin/sh -c
>>
>> This mimics the behavior of popen() and ensures setting the pager to
>> something like "LESS=FSRX less" will work.
>
> I don't understand why people would do that when they can just as well
> use command line options, or they could export the LESS variable in
> their shell startup file.
Trouble is even using CLI options requires either splitting arguments
(potentially dangerous, easy to screw up) or using system()/popen().
The latter is an option, but the docs even suggested setting the pager
to "LESS=FSRX less" IIRC.
> I'm afraid that people will expect "FOO=bar baz" to start working
> whenever they are asked to enter the name of an executable, i.e., in
> the
> merge tools configuration.
Yup. Users are such a pain! ;)
>
> --
> Martin Geisler
>
> aragost Trifork
> Professional Mercurial support
> http://aragost.com/mercurial/
More information about the Mercurial-devel
mailing list