Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 5/6] am: Fix launching of pager

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:15

Jonathan Nieder [off-list ref] writes:
quoted hunk
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index d56426d..f3b5237 100755
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -107,6 +107,22 @@ git_editor() {
 	eval "$GIT_EDITOR" '"$@"'
 }
 
+git_pager() {
+	if test -z "${GIT_PAGER+set}"
+	then
+		if tty <&1 >/dev/null 2>/dev/null
+		then
+			GIT_PAGER=cat
+		else
+			GIT_PAGER=$(git var GIT_PAGER)
+		fi
+	fi
+	: ${LESS=-FRSX}
+	export LESS
+
+	eval "$GIT_PAGER" '"$@"'
+}
+
I didn't read other patches, but I think this is a good change.

Acked-by: Junio C Hamano <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help