* [Bug 216603] New: Environment variable MANLESS is described wrong in man(1)
@ 2022-10-18 19:55 bugzilla-daemon
2022-10-18 20:05 ` [Bug 216603] " bugzilla-daemon
2022-10-18 20:19 ` bugzilla-daemon
0 siblings, 2 replies; 3+ messages in thread
From: bugzilla-daemon @ 2022-10-18 19:55 UTC (permalink / raw)
To: linux-man
https://bugzilla.kernel.org/show_bug.cgi?id=216603
Bug ID: 216603
Summary: Environment variable MANLESS is described wrong in
man(1)
Product: Documentation
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: man-pages
Assignee: documentation_man-pages@kernel-bugs.osdl.org
Reporter: karttu+bugzilla@gmail.com
Regression: No
In an example for setting MANLESS environment variable, man(1) claims:
For example, if you want to set the prompt string unconditionally
to "my prompt string", set $MANLESS to '-Psmy prompt string'.
However, this is not not correct as man uses the entire MANLESS variable
as a prompt for less. I'll demonstrate:
$ MANLESS='-Ps(prompt)' man man
<ctrl-z>
$ cat /proc/$(pgrep -P $(pgrep -f "man man"))/environ |
tr '\0' '\n' | grep "^LESS="
LESS=-ix8RmPm-Ps(prompt)$PM-Ps(prompt)$
As seen, man(1) defines -Pm and -PM prompts using the MANLESS variable as is.
The same applies to the command line option -r:
$ man -r'-Ps(prompt)' man
<ctrl-z>
$ cat /proc/$(pgrep -P $(pgrep -f "man .* man"))/environ |
tr '\0' '\n' | grep "^LESS="
LESS=-ix8RmPm-Ps(prompt)$PM-Ps(prompt)$
Option -r does not make the same claim, but it says:
By default man sets the -ix8 options.
Which also is a bit outdated as we can see it sets -ix8R.
So in summary, at least the '-Ps' part should be removed from the MANLESS
description example. Furthermore, option -r description could elaborate on
how LESS variable is formed (-ix8RmPm<MANLESS or -r>$PM<MANLESS or -r>$).
Note: Dollar sign in less prompt definition is an end-of-string marker.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug 216603] Environment variable MANLESS is described wrong in man(1)
2022-10-18 19:55 [Bug 216603] New: Environment variable MANLESS is described wrong in man(1) bugzilla-daemon
@ 2022-10-18 20:05 ` bugzilla-daemon
2022-10-18 20:19 ` bugzilla-daemon
1 sibling, 0 replies; 3+ messages in thread
From: bugzilla-daemon @ 2022-10-18 20:05 UTC (permalink / raw)
To: linux-man
https://bugzilla.kernel.org/show_bug.cgi?id=216603
--- Comment #1 from Alejandro Colomar (man-pages) (alx.manpages@gmail.com) ---
Hi Arttu,
On 10/18/22 21:55, bugzilla-daemon@kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=216603
>
> Bug ID: 216603
> Summary: Environment variable MANLESS is described wrong in
> man(1)
> Product: Documentation
> Version: unspecified
> Hardware: All
> OS: Linux
> Status: NEW
> Severity: normal
> Priority: P1
> Component: man-pages
> Assignee: documentation_man-pages@kernel-bugs.osdl.org
> Reporter: karttu+bugzilla@gmail.com
> Regression: No
>
> In an example for setting MANLESS environment variable, man(1) claims:
>
> For example, if you want to set the prompt string unconditionally
> to "my prompt string", set $MANLESS to '-Psmy prompt string'.
>
> However, this is not not correct as man uses the entire MANLESS variable
> as a prompt for less. I'll demonstrate:
>
> $ MANLESS='-Ps(prompt)' man man
> <ctrl-z>
> $ cat /proc/$(pgrep -P $(pgrep -f "man man"))/environ |
> tr '\0' '\n' | grep "^LESS="
>
> LESS=-ix8RmPm-Ps(prompt)$PM-Ps(prompt)$
>
> As seen, man(1) defines -Pm and -PM prompts using the MANLESS variable as is.
> The same applies to the command line option -r:
>
> $ man -r'-Ps(prompt)' man
> <ctrl-z>
> $ cat /proc/$(pgrep -P $(pgrep -f "man .* man"))/environ |
> tr '\0' '\n' | grep "^LESS="
>
> LESS=-ix8RmPm-Ps(prompt)$PM-Ps(prompt)$
>
> Option -r does not make the same claim, but it says:
>
> By default man sets the -ix8 options.
>
> Which also is a bit outdated as we can see it sets -ix8R.
>
> So in summary, at least the '-Ps' part should be removed from the MANLESS
> description example. Furthermore, option -r description could elaborate on
> how LESS variable is formed (-ix8RmPm<MANLESS or -r>$PM<MANLESS or -r>$).
>
> Note: Dollar sign in less prompt definition is an end-of-string marker.
>
The man(1) page is part of the man-db project, not the Linux man-pages.
Colin is the maintainer of man-db, so I CCd him.
Their website is:
<https://man-db.nongnu.org/>
However, I'm curious about the resolution, so if you report it again in
the man-db bug tracker (I guess that's their gitlab? don't remember),
please CC me. :)
Cheers,
Alex
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug 216603] Environment variable MANLESS is described wrong in man(1)
2022-10-18 19:55 [Bug 216603] New: Environment variable MANLESS is described wrong in man(1) bugzilla-daemon
2022-10-18 20:05 ` [Bug 216603] " bugzilla-daemon
@ 2022-10-18 20:19 ` bugzilla-daemon
1 sibling, 0 replies; 3+ messages in thread
From: bugzilla-daemon @ 2022-10-18 20:19 UTC (permalink / raw)
To: linux-man
https://bugzilla.kernel.org/show_bug.cgi?id=216603
--- Comment #2 from karttu@gmail.com ---
Hi Alex, and Colin,
I've never reported any man page bugs before and I basically searched
"reporting man page bugs" and ended up at Reporting man-pages bugs
(kernel.org) <https://www.kernel.org/doc/man-pages/reporting_bugs.html>.
But of course man(1) is an exception :/
Found the issue reporting from GitLab, so it will be there.
Best Regards,
- Arttu
On Tue, 18 Oct 2022 at 23:05, Alejandro Colomar <alx.manpages@gmail.com>
wrote:
> Hi Arttu,
>
> On 10/18/22 21:55, bugzilla-daemon@kernel.org wrote:
> > https://bugzilla.kernel.org/show_bug.cgi?id=216603
> >
> > Bug ID: 216603
> > Summary: Environment variable MANLESS is described wrong in
> > man(1)
> > Product: Documentation
> > Version: unspecified
> > Hardware: All
> > OS: Linux
> > Status: NEW
> > Severity: normal
> > Priority: P1
> > Component: man-pages
> > Assignee: documentation_man-pages@kernel-bugs.osdl.org
> > Reporter: karttu+bugzilla@gmail.com
> > Regression: No
> >
> > In an example for setting MANLESS environment variable, man(1) claims:
> >
> > For example, if you want to set the prompt string unconditionally
> > to "my prompt string", set $MANLESS to '-Psmy prompt string'.
> >
> > However, this is not not correct as man uses the entire MANLESS variable
> > as a prompt for less. I'll demonstrate:
> >
> > $ MANLESS='-Ps(prompt)' man man
> > <ctrl-z>
> > $ cat /proc/$(pgrep -P $(pgrep -f "man man"))/environ |
> > tr '\0' '\n' | grep "^LESS="
> >
> > LESS=-ix8RmPm-Ps(prompt)$PM-Ps(prompt)$
> >
> > As seen, man(1) defines -Pm and -PM prompts using the MANLESS variable
> as is.
> > The same applies to the command line option -r:
> >
> > $ man -r'-Ps(prompt)' man
> > <ctrl-z>
> > $ cat /proc/$(pgrep -P $(pgrep -f "man .* man"))/environ |
> > tr '\0' '\n' | grep "^LESS="
> >
> > LESS=-ix8RmPm-Ps(prompt)$PM-Ps(prompt)$
> >
> > Option -r does not make the same claim, but it says:
> >
> > By default man sets the -ix8 options.
> >
> > Which also is a bit outdated as we can see it sets -ix8R.
> >
> > So in summary, at least the '-Ps' part should be removed from the MANLESS
> > description example. Furthermore, option -r description could elaborate
> on
> > how LESS variable is formed (-ix8RmPm<MANLESS or -r>$PM<MANLESS or -r>$).
> >
> > Note: Dollar sign in less prompt definition is an end-of-string marker.
> >
>
> The man(1) page is part of the man-db project, not the Linux man-pages.
> Colin is the maintainer of man-db, so I CCd him.
>
> Their website is:
>
> <https://man-db.nongnu.org/>
>
> However, I'm curious about the resolution, so if you report it again in
> the man-db bug tracker (I guess that's their gitlab? don't remember),
> please CC me. :)
>
> Cheers,
>
> Alex
>
> --
> <http://www.alejandro-colomar.es/>
>
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-18 20:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-18 19:55 [Bug 216603] New: Environment variable MANLESS is described wrong in man(1) bugzilla-daemon
2022-10-18 20:05 ` [Bug 216603] " bugzilla-daemon
2022-10-18 20:19 ` bugzilla-daemon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox