Re: [PATCH/RFC] Fix for default pager

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

 



On Tue, Jun 15, 2010 at 11:11:35AM -0500, Brandon Casey wrote:

> So, I think it's appropriate to set DEFAULT_PAGER on IRIX.  There can't
> be many users anyway.  It's probably appropriate to set it on Solaris
> too, if 'less' is not a commonly installed component on modern systems.
> I wonder how surprised existing git users will be, for those on Solaris
> platforms that have 'less' installed, when Solaris's crappy 'more'
> becomes their pager.

I'm a little worried about that, too. On the other hand, wouldn't people
who actually care about less have set PAGER already, to use it for
things like "man"?

> But, I also think it would be nice if git fell back to the 'cat'
> behavior when it fails to spawn the pager, because the following error
> is not very informative:
> 
>    casey@<a_solaris_box> # git log
>    sh: less: not found
>    Broken Pipe

The pager command is executed by the shell these days. Perhaps we should
simply set DEFAULT_PAGER on these platforms to "less || more || cat",
which seems to work from my simple tests. If that is too hack-ish (e.g.,
we really care about "does less exist", not "did it fail"), we can do a
more invasive patch (or even provide a "git-pager" shell script helper
to do a more thorough job).

-Peff
--
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]