[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Quilt-dev] [PATCH] scripts: let users override LESS env variable.
From: |
Kent R. Spillner |
Subject: |
[Quilt-dev] [PATCH] scripts: let users override LESS env variable. |
Date: |
Fri, 13 Dec 2013 22:01:27 -0600 |
User-agent: |
OpenSMTPD enqueuer (Demoostik) |
Add a QUILT_LESS_ARGS variable that can be used to configure what quilt will
set LESS to when LESS is undefined. Defaults to -FSRX so no functional change
in the default case, but allows users to drop the -F argument as needed (for
example, when using a multiline shell prompt) without explicitly setting LESS.
Signed-off-by: Kent R. Spillner <address@hidden>
---
doc/quilt.1.in | 6 ++++++
quilt/scripts/patchfns.in | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/doc/quilt.1.in b/doc/quilt.1.in
index 67132e9..8ac5985 100644
--- a/doc/quilt.1.in
+++ b/doc/quilt.1.in
@@ -284,6 +284,12 @@ the following content to ~/.quiltrc (or
/etc/quilt.quiltrc):
.fi
.RE 4
+.IP QUILT_LESS_ARGS 4
+
+The value quilt sets in the LESS environment variable before starting the
+pager regardless of which pager quilt is configured to use. Defaults to
+the existing value of LESS, or "-FRSX" if LESS is undefined.
+
.SH AUTHORS
Quilt started as a series of scripts written by Andrew Morton
diff --git a/quilt/scripts/patchfns.in b/quilt/scripts/patchfns.in
index 9ee56db..fb05794 100644
--- a/quilt/scripts/patchfns.in
+++ b/quilt/scripts/patchfns.in
@@ -1008,7 +1008,8 @@ setup_pager()
[ -z "$QUILT_PAGER" -o "$QUILT_PAGER" = "cat" ] && return 0
- export LESS="${LESS:-FRSX}"
+ QUILT_LESS_ARGS="${QUILT_LESS_ARGS-${LESS:-FRSX}}"
+ export LESS="${QUILT_LESS_ARGS}"
# NOTE: with "exec > >($pager)" there is no way to get the pid of the
# pager so we can't wait for it to complete. Otherwise we wouldn't
--
1.8.4.3
- [Quilt-dev] [PATCH] scripts: let users override LESS env variable.,
Kent R. Spillner <=