[PATCH] stash: Don't paginate by default with list command

Subsystems: the rest

DORMANTno replies

6 messages, 3 authors, 2016-06-15 · open the first message on its own page

[PATCH] stash: Don't paginate by default with list command

From: Ingo Brückl <hidden>
Date: 2016-06-15 22:51:57

The output of "stash list" is such that piping into a pager
normally isn't necessary but annoying, so disable it by default.

Signed-off-by: Ingo Brückl <redacted>
---
 git-stash.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-stash.sh b/git-stash.sh
index 31dec0a..b92d986 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -264,7 +264,7 @@ have_stash () {

 list_stash () {
 	have_stash || return 0
-	git log --format="%gd: %gs" -g "$@" $ref_stash --
+	git --no-pager log --format="%gd: %gs" -g "$@" $ref_stash --
 }

 show_stash () {
--
1.7.6

Re: [PATCH] stash: Don't paginate by default with list command

From: Ben Walton <hidden>
Date: 2016-06-15 22:51:57

Excerpts from Ingo Brückl's message of Tue Aug 30 13:21:18 -0400 2011:
The output of "stash list" is such that piping into a pager
normally isn't necessary but annoying, so disable it by default.
If you $PAGER is less and you use the default LESS environment value
FRXS, this shouldn't be annoying at all.  Are you using either a
different pager or a different value for LESS?

Thanks
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302

Re: [PATCH] stash: Don't paginate by default with list command

From: Raphael Zimmerer <hidden>
Date: 2016-06-15 22:51:57

On Tue, Aug 30, 2011 at 07:21:18PM +0200, Ingo Brückl wrote:
The output of "stash list" is such that piping into a pager
normally isn't necessary but annoying, so disable it by default.
Why is the current behaviour annoying?

Here on my (default) setup the pager automatically exits if the entire
output can be displayed on the screen, as with any other git
command. Is there any chance you have set the LESS environment
variable somewhere? To disable the pager for some commands, cou can
have a look at the *.pager config variables (man git-confg). However,
'pager.stash' is not recognized... The 'alias.*' config variables may
be interesting, too.

Raphael

Re: [PATCH] stash: Don't paginate by default with list command

From: Ingo Brückl <hidden>
Date: 2016-06-15 22:51:57

Ben Walton wrote on Tue, 30 Aug 2011 13:43:46 -0400:
Excerpts from Ingo Brückl's message of Tue Aug 30 13:21:18 -0400 2011:
quoted
The output of "stash list" is such that piping into a pager
normally isn't necessary but annoying, so disable it by default.
If you $PAGER is less and you use the default LESS environment value
FRXS, this shouldn't be annoying at all.  Are you using either a
different pager or a different value for LESS?
For some reason I have '-c' in LESS which must be convenient for a case
I currently don't remember.

Ingo

Re: [PATCH] stash: Don't paginate by default with list command

From: Raphael Zimmerer <hidden>
Date: 2016-06-15 22:51:57

On Tue, Aug 30, 2011 at 08:24:04PM +0200, Ingo Brückl wrote:
Ben Walton wrote on Tue, 30 Aug 2011 13:43:46 -0400:
quoted
Excerpts from Ingo Brückl's message of Tue Aug 30 13:21:18 -0400 2011:
quoted
quoted
The output of "stash list" is such that piping into a pager
normally isn't necessary but annoying, so disable it by default.
quoted
If you $PAGER is less and you use the default LESS environment value
FRXS, this shouldn't be annoying at all.  Are you using either a
different pager or a different value for LESS?
For some reason I have '-c' in LESS which must be convenient for a case
I currently don't remember.
When you don't require the '-c' option for paging in git, please try
'core.pager = less -FRXS'. That forces git's default behaviour
regardless of the LESS environment variable.

Raphael

Re: [PATCH] stash: Don't paginate by default with list command

From: Ingo Brückl <hidden>
Date: 2016-06-15 22:51:57

I wrote on Tue, 30 Aug 2011 20:24:04 +0200:
Ben Walton wrote on Tue, 30 Aug 2011 13:43:46 -0400:
quoted
Excerpts from Ingo Brückl's message of Tue Aug 30 13:21:18 -0400 2011:
quoted
quoted
The output of "stash list" is such that piping into a pager
normally isn't necessary but annoying, so disable it by default.
quoted
If you $PAGER is less and you use the default LESS environment value
FRXS, this shouldn't be annoying at all.  Are you using either a
different pager or a different value for LESS?
For some reason I have '-c' in LESS which must be convenient for a case
I currently don't remember.
Now I know again. '-c' is within my LESS because I like small "git diff"
output printed on an erased terminal. I think it is easier to overview that
way.

With "git stash list" I'd like it the other way, because that output is
just a simple list (and usually very small in my case).

Ingo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help