summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2022-10-18 00:09:40 +0100
committerColin Watson <cjwatson@debian.org>2022-10-18 00:09:40 +0100
commit09304c00a4a3dea95da5d1f0aa1ad4c20c292f3b (patch)
treed19280bca053959aa6f8778a5cb25dd420423dc3 /include
parentfba1f23672e534ca4bb4d61baf5fb28e9ee5a9da (diff)
Escape $ in page names when constructing less prompts
Fixes Debian bug #1021951. * include/manconfig.h (LESS_OPTS): Add `--use-backslash`. * src/man.c (escape_less): Also escape `$` characters. * NEWS.md: Document this.
Diffstat (limited to 'include')
-rw-r--r--include/manconfig.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/manconfig.h b/include/manconfig.h
index 0baa4412..4f2caea5 100644
--- a/include/manconfig.h
+++ b/include/manconfig.h
@@ -105,11 +105,14 @@
* (R)aw control chars (but keep track of screen appearance)
* (m)ore display style
*
+ * The --use-backslash option allows escaping dollar signs safely in
+ * prompts, though requires less >= 457 (released in 2012).
+ *
* If you change this, be sure to match the format with
* man.c:make_display_command().
*/
-#define LESS_OPTS "-ix8RmPm%s$PM%s$"
+#define LESS_OPTS "--use-backslash -ix8RmPm%s$PM%s$"
/* This is a minimal latin1 special characters to ascii translation table */
#if !defined(TR_SET1) || !defined(TR_SET2)