summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2012-12-21 21:29:54 +0000
committerColin Watson <cjwatson@debian.org>2012-12-21 21:29:54 +0000
commitfe8aa1c3b8d777322d45c4ecf64477e77f9183c2 (patch)
treef4384444ad6374381aee7d67d54fec923ca828ea /src
parent21b0af49ccb640815f6f55b7500b5646e86dcbaa (diff)
* src/man.c (main): Use $MANLESS as the default for prompt_string if
the -r option was not used. (setenv_less): Remove code to copy $MANLESS verbatim into $LESS. * man/man1/man.man1 (Controlling formatted output, ENVIRONMENT): Describe new behaviour of $MANLESS. * man/po4a/po/man-db-manpages.pot, man/po4a/po/*.po: Update.
Diffstat (limited to 'src')
-rw-r--r--src/man.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/man.c b/src/man.c
index 485b394e..6b8dc581 100644
--- a/src/man.c
+++ b/src/man.c
@@ -1153,6 +1153,9 @@ int main (int argc, char *argv[])
pager = get_def_user ("cat", CAT);
if (prompt_string == NULL)
+ prompt_string = getenv ("MANLESS");
+
+ if (prompt_string == NULL)
#ifdef LESS_PROMPT
prompt_string = LESS_PROMPT;
#else
@@ -1902,12 +1905,6 @@ static void setenv_less (pipecmd *cmd, const char *title)
{
const char *esc_title;
char *less_opts, *man_pn;
- const char *force = getenv ("MANLESS");
-
- if (force) {
- pipecmd_setenv (cmd, "LESS", force);
- return;
- }
esc_title = escape_less (title);
less_opts = xasprintf (LESS_OPTS, prompt_string, prompt_string);