help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash man page and FreeBSD mandoc


From: David Ongaro
Subject: Re: bash man page and FreeBSD mandoc
Date: Mon, 29 Apr 2024 09:43:16 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

Chet Ramey writes:

> On 12/22/18 12:49 AM, Derek Schrock wrote:
>> On Fri, Dec 21, 2018 at 09:59:16AM EST, Chet Ramey wrote:
>>> This is a macro redefinition fix for an old bug in the BSD and Ultrix man
>>> macros. We can try removing it, since there probably aren't any remaining
>>> systems using them.
>> 
>> Ok, I see that whole block is related to the comment.  So the fix here
>> would be to remove lines 14 to 38 not just removing the characters?
>
> Yes. The fixed version of that macro still lives on in the Solaris 10
> man macros, but the broken ones are probably all gone.

As of now I can still see these control characters included in the man
page of a current bash version (GNU bash, version 5.2.26(1)-release
(aarch64-apple-darwin23.2.0)). What's interesting though is that Apple
seems to have removed the offending lines from the manpage they ship
with their ancient bash:

$ diff /opt/homebrew/share/man/man1/bash.1 /usr/share/man/man1/bash.1 | head -50
4a5
> .\"   Information Network Services
6c7
< .\"   chet.ramey@case.edu
---
> .\"   chet@po.cwru.edu
8c9
< .\"   Last Change: Mon Sep 19 11:13:21 EDT 2022
---
> .\"   Last Change: Thu Sep 28 10:25:59 EDT 2006
13c14
< .TH BASH 1 "2022 September 19" "GNU Bash 5.2"
---
> .TH BASH 1 "2006 September 28" "GNU Bash-3.2"
15,39d15
< .\" There's some problem with having a `@'
< .\" in a tagged paragraph with the BSD man macros.
< .\" It has to do with `@' appearing in the }1 macro.
< .\" This is a problem on 4.3 BSD and Ultrix, but Sun
< .\" appears to have fixed it.
< .\" If you're seeing the characters
< .\" `@u-3p' appearing before the lines reading
< .\" `possible-hostname-completions
< .\" and `complete-hostname' down in READLINE,
< .\" then uncomment this redefinition.
< .\"
< .\" .de }1
< .\" .ds ]X \&\\*(]B\\
< .\" .nr )E 0
< .\" .if !"\\$1"" .nr )I \\$1n
< .\" .}f
< .\" .ll \\n(LLu
< .\" .in \\n()Ru+\\n(INu+\\n()Iu
< .\" .ti \\n(INu
< .\" .ie !\\n()Iu+\\n()Ru-\w\\*(]Xu-3p \{\\*(]X
< .\" .br\}
< .\" .el \\*(]X\h|\\n()Iu+\\n()Ru\c
< .\" .}f
< .\" ..
< .\"
51c27
< [command_string | file]
---
> [file]
53,54c29,30
< .if n Bash is Copyright (C) 1989-2022 by the Free Software Foundation, Inc.
< .if t Bash is Copyright \(co 1989-2022 by the Free Software Foundation, Inc.
---
> .if n Bash is Copyright (C) 1989-2005 by the Free Software Foundation, Inc.
> .if t Bash is Copyright \(co 1989-2005 by the Free Software Foundation, Inc.

The effect is that one gets an annoying 1 sec delay when invoking

    man bash

because Apple wrapped the man command in a shell script which outputs
the message

    This manpage is not compatible with mandoc(1) and might display incorrectly.

with this delay if mandoc reports errors for them. (So the problem is
bigger than the bash manpage, and there hopefully is a fix forthcoming
from Apple, but that doesn't change the fact that we include an
unnecessary outdated comment in the header of the current bash manpage.)

I understand that as a GNU project there is no obligation to fix the
behavior on non-free systems, but on one hand I think some BSD systems
can be considered 'free' and on the other hand it may give the
unwarranted impression that the GNU shipped bash version is somehow
'broken' while the Apple shipped version is not.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]