From: Patrick Palka <patrick@parcs.ath.cx>
To: git@vger.kernel.org
Cc: Patrick Palka <patrick@parcs.ath.cx>
Subject: [PATCH] Documentation: improve the example of overriding LESS via core.pager
Date: Sun, 28 Oct 2012 16:12:46 -0400 [thread overview]
Message-ID: <1351455166-2579-1-git-send-email-patrick@parcs.ath.cx> (raw)
You can override an option set in the LESS variable by simply prefixing
the command line option with `-+`. This is more robust than the previous
example if the default LESS options are to ever change.
Signed-off-by: Patrick Palka <patrick@parcs.ath.cx>
---
Documentation/config.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 11f320b..9a0544c 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -538,14 +538,14 @@ core.pager::
`LESS` variable to some other value. Alternately,
these settings can be overridden on a project or
global basis by setting the `core.pager` option.
- Setting `core.pager` has no affect on the `LESS`
+ Setting `core.pager` has no effect on the `LESS`
environment variable behaviour above, so if you want
to override git's default settings this way, you need
to be explicit. For example, to disable the S option
in a backward compatible manner, set `core.pager`
- to `less -+$LESS -FRX`. This will be passed to the
- shell by git, which will translate the final command to
- `LESS=FRSX less -+FRSX -FRX`.
+ to `less -+S`. This will be passed to the shell by
+ git, which will translate the final command to
+ `LESS=FRSX less -+S`.
core.whitespace::
A comma separated list of common whitespace problems to
--
1.7.10.4
next reply other threads:[~2012-10-28 20:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-28 20:12 Patrick Palka [this message]
2012-10-29 6:26 ` [PATCH] Documentation: improve the example of overriding LESS via core.pager Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1351455166-2579-1-git-send-email-patrick@parcs.ath.cx \
--to=patrick@parcs.ath.cx \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).