groff
[Top][All Lists]
Advanced

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

Re: [groff] improve a few terminal renderings of special characters


From: John Gardner
Subject: Re: [groff] improve a few terminal renderings of special characters
Date: Sat, 1 Sep 2018 23:49:29 +1000

> I'd respectfully recommend the opposite approach:  Blacklist the (few)
> systems where man -w is broken (if you don't want to test dynamically).

Tips on testing dynamically? A `configure`-like script was my original
idea, but I don't want tests to bring about unwanted side-effects for the
user...

There's also the issue of cat-paths being returned by `man -k` when the
source files are required. I don't think I can just swap a few directory
names out and expect to always find the unformatted version of a catted
man-page. For example:

$ uname -a
OpenBSD titan.my.domain 6.3 GENERIC.MP#8 amd64
$ man -w groff_diff
/usr/local/man/cat7/groff_diff.0
$ stat /usr/local/man/man7/groff_diff.?
stat: /usr/local/man/man7/groff_diff.?: No such file or directory


So this means we need to rely on man(1) having an option for *"un-catted
pages only please"*.



On Sat, 1 Sep 2018 at 23:01, Ingo Schwarze <address@hidden> wrote:

> Hi John,
>
> John Gardner wrote on Sat, Sep 01, 2018 at 10:26:40PM +1000:
>
> > Ah I see, thanks. I might end up whitelisting sane systems (*BSD) and
> > stupidly predictable ones (macOS), falling back to a JS-based
> > implementation for all other cases.
>
> I'd respectfully recommend the opposite approach:  Blacklist the (few)
> systems where man -w is broken (if you don't want to test dynamically).
> That way, you don't punish new systems.  Just because something has
> a weird name we haven't heard yet doesn't mean it's insane and deleted
> features that have been reliable since Unix v7 in 1979.
>
> > It gets better (or worse). Here's what Solaris 11.3's `man -k grep`
> emits:
> >
> > $ ~: man -k grep
> >
> > 1. grep(1) /usr/share/man/man1/grep.1
> > grep - search a file for a pattern
>
> That's relatively recent:
>
>    > uname -a
>   SunOS unstable10s 5.10 Generic_150400-17 sun4v sparc
> SUNW,SPARC-Enterprise-T5220
>    > man -k grep | head -n 2
>   bzegrep         bzgrep (1)      - search possibly bzip2 compressed files
> for a regular expression
>   bzfgrep         bzgrep (1)      - search possibly bzip2 compressed files
> for a regular expression
>
> > ... which is probably the closest I've come to finding an equivalent to
> > `man -k` on Solaris..
>
> But it will only work on Solaris 11.  Neither on 9 nor 10.
> Who knows about Illumos.
>
> In general, if something works on Solaris 11, don't assume it's the same
> on Solaris 10, and even less so on Solaris 9.  These systems differ a lot,
> in particular with respect to questions of portability.
>
> > I blame Oracle. Always blame Oracle.
>
> I certainly don't like Oracle - but you shouldn't blame people for
> evils predating any of their actions:
>
>    > uname -a
>   SunOS unstable9s 5.9 Generic_Virtual sun4u sparc
> SUNW,SPARC-Enterprise-T5220
>    > man -w ls
>   usage:  man [-] [-adFlrt] [-M path] [-T macro-package ] [ -s section ]
> name ...
>           man [-M path] -k keyword ...
>           man [-M path] -f file ...
>
> SunOS 5.9 was released in 2002, and Oracle aquired SUN in 2010.
> So i fear for this particular bug, you have to blame good old SUN...
>
> Yours,
>   Ingo
>


reply via email to

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