tags 690831 fixed-upstream thanks On Thu, Oct 18, 2012 at 10:16:00AM +0200, Sebastien Hinderer wrote: > The default less prompt for, say, man man, looks like this: > > Manual page man(1) line 1/815 4% (press h for help or q to quit) > > I would like to have a prompt looking like this: > > Manual page man(1) line 1/815 4% > > In other words the same prompt without the " (press h for help or q to > quit)" part. > > Since I'd like this change to be permanent, I wanted to use the MANLESS > variable but, as said by man man, its value "will be copied verbatim into > $LESS", which among other things means that $MAN_PN will not be > replaced by the manual page and section number.
Hmm, yes. I think I was misguided about the proper semantics when I implemented MANLESS. I've committed this change upstream: Fri Dec 21 21:29:27 GMT 2012 Colin Watson <cjwat...@debian.org> * 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. This means that the following environment variable setting would work for you: MANLESS=' Manual page $MAN_PN ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%..' Now, this is at the cost of two incompatibilities. Firstly, anyone who actually wanted literal "$MAN_PN" in their prompt now has to escape it (e.g. by interposing some no-op less prompt string fragment such as "?a."; and with less >= 456 they need an additional backslash before the $). I'm not so worried about this. Secondly, -r now overrides MANLESS rather than the other way round; while this is a change, I think it's definitely more standard and correct. Thanks, -- Colin Watson [cjwat...@debian.org] -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org