On 26 Aug 2013 21:53, "Dale R. Worley" <wor...@alum.mit.edu> wrote:
>
> > From: Konstantin Khomoutov <flatw...@users.sourceforge.net>
> >
> > > 2) I dislike defaulting to using a pager
> >
> > I think you're a part of a minority in this case -- when you work with
> > Git in a shell, having to append " | mypetpager" onto the end of each
> > Git command producing a lengthy output quickly becomes tedious up to a
> > point of creating specific aliases etc.  And Git's awareness of the
> > interactivity of the user's terminal does not ends here: if it detects
> > the prospective output would fit into a single screenful, it does not
> > pipe it through less, so when Git is used *interactively,* it's
> > behaviour is just natural -- you have paging exactly when you would
> > need it.
>
> I've a general attitude that the basic behavior of a program should
> have as little complexity as possible.  In this case, since Git
> provides a good facility for setting one's paging preferences, I would
> make non-pagination the default.

Using a pager by default (be it less or anything) actually makes it easier
t use. As Konstantin said, paging is only enabled in interactive mode.

>
> This is enhanced by the fact that 99% of the time that I am using a
> shell, it is within a shell window in Emacs, so long output will be
> properly saved (and be searchable) afterward.

Being a Vi user myself, I dont't know how emacs handles this kind of stuff
(output coming from an external program), but Vi doesn't activate the pager.

>
> > > (partly because I dislike "less" in particular).
> >
> > I'm not sure what's wrong with less, really: it supports searching
> > in both directions, has control over line wrapping, supports ANSI color
> > codes and even a mode analogous to `tail -f` -- the latter feature is
> > not applicable here but I'm trying to show that this tool is of general
> > use to a typical command-line-savvy power user.
>
> My complaint about "less" is that it does not exit when one types
> control-C.

No, it exits on pressing Q. Also, it can be configured, AFAIK.

>
> > Also I think `less` is considered no less standard than `cat` on a
> > typical contemporary Unix-like system so lots of power users just have
> > finger memory for it, like they do for their text editor of choice.
> >
> > In either case, alternatives exist (I'm able to recall `most` off the
> > top of my mind).
>
> "less" was named as a pun on "more", which was the name of the simpler
> paging program that was previously very popular.

Being a pun doesn't make any pager more or less (sorry for that). Actually,
more still exists, and it's somewhat popular, mostly among people with long
MS-DOS background. And less is actually more than more, as it provides
backwards searching/paging.

>
> > > 3) In any case, using a pager by default doesn't seem to be
> > > documented, either on the main "git" manual page or in "git-config".
> >
> > Please consider bringing this up on the main Git list then.
>
> Yes...  Clearly, we don't want to change the standard behavior now.
> But I see that the paging behavior is controlled by at least 5 things:
>
> the -p/--paginate/--no-pager options
> the GIT_PAGER environment variable
> the PAGER environment variable
> the core.pager Git configuration variable
> the build-in default (which is "less")
>
> There is documentation in git.1 and git-config.1, and the two are not
> coordinated to make it clear what happens.  So I'll ask the main Git
> list what the intended behavior is.
>
> Dale
>
> --
> You received this message because you are subscribed to the Google Groups
"Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to