Re: [PATCH/RFC] Fix for default pager

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 10, 2010 at 10:29, Jeff King <peff@xxxxxxxx> wrote:
> On Wed, Jun 09, 2010 at 11:08:49AM +0200, Tor Arntsen wrote:
>
>> If it's true that Git should demand 'less' to be installed before
>> being usable out of the box.. well, that's just plain silly.
>
> It depends on how you define "out of the box". The person compiling it
> just needs to set DEFAULT_PAGER appropriately for their system. "less"
> is a sane choice for most modern systems. But we can make it even easier
> on AIX people with:
>
> diff --git a/Makefile b/Makefile
> index 34b7dd5..6ad0aca 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -930,6 +930,7 @@ ifeq ($(uname_S),NetBSD)
>        HAVE_PATHS_H = YesPlease
>  endif
>  ifeq ($(uname_S),AIX)
> +       DEFAULT_PAGER = more
>        NO_STRCASESTR=YesPlease
>        NO_MEMMEM = YesPlease
>        NO_MKDTEMP = YesPlease

That looks good to me.

> That won't do automagic run-time detection if you have "less" installed,
> but given your claim that AIX's "more" actually doesn't suck, it's
> probably a good default.

It does the paging just as 'less', yes. I can page 'git log' or any
other output. backwards/forwards as I wish. I'm not aware of any
'more' other than the AIX one that does this. Even the archaic
(pre-AIX5) versions did. The AIX 'more' also have several more
in-buffer options compared to e.g. Linux 'more'.  It sits somewhere
between traditional 'more' and 'less', feature-wise. (The AIX 6
version even does the, to me, annoying less-style erase-screen, unless
turned off by an option or environment variable.)

> People who care can set their PAGER environment
> variable.

-Tor
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]