Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Aug 2018 22:17:12 -0500
From:      Kyle Evans <kevans@freebsd.org>
To:        Alan Somers <asomers@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r337497 - in head: . contrib/mdocml contrib/tnftp/src etc/root share/skel tools/tools/nanobsd/pcengines/Files/root tools/tools/nanobsd/rescue/Files/root usr.bin/mail usr.bin/man usr.bin...
Message-ID:  <CACNAnaF_Da3K=pWY4iFDq2qKTZ5E3-z5CEw_GUOQ-%2Byqu9hszQ@mail.gmail.com>
In-Reply-To: <CAOtMX2i1=VKRxFEf=mXngUQ9q2irG26Qu0t0foJaCDt97D_WWw@mail.gmail.com>
References:  <201808081924.w78JOKLP061364@repo.freebsd.org> <CACNAnaEV=E3ssvsJHtS61Udogc-4=2oeYqprCykxdWZ2Gpv2AQ@mail.gmail.com> <CAOtMX2i1=VKRxFEf=mXngUQ9q2irG26Qu0t0foJaCDt97D_WWw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 24, 2018 at 10:12 PM Alan Somers <asomers@freebsd.org> wrote:
>
> On Fri, Aug 24, 2018 at 8:12 PM Kyle Evans <kevans@freebsd.org> wrote:
>>
>> On Wed, Aug 8, 2018 at 2:24 PM Alan Somers <asomers@freebsd.org> wrote:
>> >
>> > Author: asomers
>> > Date: Wed Aug  8 19:24:20 2018
>> > New Revision: 337497
>> > URL: https://svnweb.freebsd.org/changeset/base/337497
>> >
>> > Log:
>> >   Switch the default pager for most commands to less
>> >
>> >   Finally, a pager for the nineties.
>> >
>> >   MFC after:    Never
>> >   Relnotes:     Yes
>> >   Differential Revision:        https://reviews.freebsd.org/D13465
>> >   Poll:         https://reviews.freebsd.org/V7
>> >
>>
>> Hi,
>>
>> Hurray!
>>
>> > [... snip ...]
>> > --- head/usr.sbin/mergemaster/mergemaster.sh    Wed Aug  8 19:21:08 20=
18        (r337496)
>> > +++ head/usr.sbin/mergemaster/mergemaster.sh    Wed Aug  8 19:24:20 20=
18        (r337497)
>> > @@ -426,19 +426,19 @@ check_pager () {
>> >      echo ''
>> >      echo "  or you may type an absolute path to PAGER for this run"
>> >      echo ''
>> > -    echo "  Default is to use plain old 'more' "
>> > +    echo "  Default is to use 'less' "
>> >      echo ''
>> > -    echo -n "What should I do? [Use 'more'] "
>> > +    echo -n "What should I do? [Use 'less'] "
>> >      read FIXPAGER
>> >
>> >      case "${FIXPAGER}" in
>> >      [eE])
>> >         exit 0
>> >         ;;
>> > -    [lL])
>> > +    [lL]|'')
>> >         PAGER=3Dless
>> >         ;;
>> > -    [mM]|'')
>> > +    [mM])
>> >         PAGER=3Dmore
>> >         ;;
>> >      /*)
>> > @@ -458,11 +458,11 @@ check_pager () {
>> >  esac
>> >
>> >  # If user has a pager defined, or got assigned one above, use it.
>> > -# If not, use more.
>> > +# If not, use less.
>> >  #
>> > -PAGER=3D${PAGER:-more}
>> > +PAGER=3D${PAGER:-less}
>> >
>> > -if [ -n "${VERBOSE}" -a ! "${PAGER}" =3D "more" ]; then
>> > +if [ -n "${VERBOSE}" -a ! "${PAGER}" =3D "less" ]; then
>> >    echo " *** You have ${PAGER} defined as your pager so we will use t=
hat"
>> >    echo ''
>> >    sleep 3
>> > @@ -1127,7 +1127,7 @@ for COMPFILE in `find . -type f | sort`; do
>> >      else
>> >        # Ok, the files are different, so show the user where they diff=
er.
>> >        # Use user's choice of diff methods; and user's pager if they h=
ave one.
>> > -      # Use more if not.
>> > +      # Use less if not.
>> >        # Use unified diffs by default.  Context diffs give me a headac=
he. :)
>> >        #
>> >        # If the user chose the -F option, test for that before proceed=
ing
>> >
>>
>> Any chance you'd consider `less -E` for mergemaster, instead of
>> unsalted less? After going through a second round of updates since
>> this, that one feels super repetitive as you end up with two
>> keystrokes at the end per file that differs as opposed to the previous
>> one. This is pretty nit-picky, so I won't be upset if you say no. =3D)
>>
>> Thanks,
>>
>> Kyle Evans
>
>
> Hmm, "-E" would make sense for mergemaster, even though I hate that behav=
ior for man.  But if mergemaster's pager is going to use different options =
than other applications, then it also should get its own variable; mergemas=
ter should use MERGEMASTERPAGER the way that man uses MANPAGER.  Agree?
>

I'm inclined to agree on both counts. While I don't like a
proliferation of things to set to override defaults like this in the
general case, it seems to make sense for mergemaster. The application
of pager here is a different use case than most.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaF_Da3K=pWY4iFDq2qKTZ5E3-z5CEw_GUOQ-%2Byqu9hszQ>