Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'git-sh-setup.sh')
-rw-r--r--git-sh-setup.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index 5e22440aec..7a095665d7 100644
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -107,6 +107,19 @@ git_editor() {
eval "$GIT_EDITOR" '"$@"'
}
+git_pager() {
+ if test -t 1
+ then
+ GIT_PAGER=$(git var GIT_PAGER)
+ else
+ GIT_PAGER=cat
+ fi
+ : ${LESS=-FRSX}
+ export LESS
+
+ eval "$GIT_PAGER" '"$@"'
+}
+
sane_grep () {
GREP_OPTIONS= LC_ALL=C grep "$@"
}