• Re: Documentation (man, info, etc.) (was Re: The Bash =?UTF-8?Q?Hacker=E2=80=99s?= Wiki)

    From Yeechang Lee@ylee@columbia.edu to comp.unix.shell on Tue Nov 4 02:37:55 2025
    From Newsgroup: comp.unix.shell

    Janis Papanagnou wrote:
    (BTW; hasn't anyone yet created an info2man converter?

    I have had this in ~/.bashrc for years:

    function mani () { info $1 --subnodes --output - | less; }

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From gazelle@gazelle@shell.xmission.com (Kenny McCormack) to comp.unix.shell on Tue Nov 4 10:57:31 2025
    From Newsgroup: comp.unix.shell

    In article <slrn10gjls3.591.ylee@columbia.edu>,
    Yeechang Lee <ylee@columbia.edu> wrote:
    Janis Papanagnou wrote:
    (BTW; hasn't anyone yet created an info2man converter?

    I have had this in ~/.bashrc for years:

    function mani () { info $1 --subnodes --output - | less; }


    That's not bad. A couple of notes from my "just now" testing:

    1) Needs better error handling if the node doesn't exist. I tried
    running it for "gawk" (on a system where GAWK was not installed at the
    system level) and it generated a blank screen.

    Note that "info gawk" (without the fancy options and piping as above)
    gets to a screen telling you about the nodes that do exist. But
    somehow, this screen gets lost in the shuffle when the above options and
    piping are used.

    2) You need "less -R", or else you get weird stuff displayed by less.

    P.S. Hmmm. I just tried "info gawk" on a system where GAWK *is* installed
    at the system level and it still bombed out. Weird.
    --
    https://en.wiktionary.org/wiki/res_ipsa_loquitur
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.unix.shell on Tue Nov 4 21:04:09 2025
    From Newsgroup: comp.unix.shell

    On Tue, 4 Nov 2025 02:37:55 -0800, Yeechang Lee wrote:

    I have had this in ~/.bashrc for years:

    function mani () { info $1 --subnodes --output - | less; }

    HererCOs a handy example command for viewing a man page in a nicely typeset rendering:

    gunzip -c $(man -w bash) | groff -ktman -Tpdf | okular -

    What would be an equivalent for info?
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From gazelle@gazelle@shell.xmission.com (Kenny McCormack) to comp.unix.shell on Tue Nov 4 22:56:42 2025
    From Newsgroup: comp.unix.shell

    In article <10edpo8$3tq9g$6@dont-email.me>,
    Lawrence DOliveiro <ldo@nz.invalid> wrote:
    On Tue, 4 Nov 2025 02:37:55 -0800, Yeechang Lee wrote:

    I have had this in ~/.bashrc for years:

    function mani () { info $1 --subnodes --output - | less; }

    Heres a handy example command for viewing a man page in a nicely typeset >rendering:

    gunzip -c $(man -w bash) | groff -ktman -Tpdf | okular -

    What would be an equivalent for info?

    I don't know, but here is a simpler version of the above pipeline:

    man -Tpdf bash | xpdf /dev/stdin
    --
    The randomly chosen signature file that would have appeared here is more than 4 lines long. As such, it violates one or more Usenet RFCs. In order to remain in compliance with said RFCs, the actual sig can be found at the following URL:
    http://user.xmission.com/~gazelle/Sigs/Aspergers
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Kaz Kylheku@643-408-1753@kylheku.com to comp.unix.shell on Sat Aug 23 20:16:09 2025
    From Newsgroup: comp.unix.shell

    On 2025-08-23, Jim <zsd@jdvb.ca> wrote:
    On 2025-08-22 at 20:05 ADT, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
    On 23.08.2025 00:40, Keith Thompson wrote:

    Yes. I think that for some GNU tools, the info and man documents
    contain the same information. For others, the man page is just a brief
    summary, sometimes generated from "--help" output with "help2man".

    I've meanwhile looked also into the size of the man pages...

    Number of man pages with number of lines
    512 with 1..40 lines
    1641 with 41..200 lines
    781 with 201..1000 lines
    159 with 1001..5000 lines
    28 with 5001..20000 lines

    That doesn't appear to be just irrelevant information, at least.

    Is that 20000 tight? That is, are there man pages that big, or did your histogramization (?) arbitrarily pick 20000?

    $ man txr | wc
    46266 382645 2775327

    No, hold it, correction. I have a wide terminal. We have to measure
    using the 80 column standard:

    $ MANWIDTH=80 man txr | wc
    67616 386241 3110809

    That's more like it!
    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @Kazinator@mstdn.ca
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Keith Thompson@Keith.S.Thompson+u@gmail.com to comp.unix.shell on Sat Aug 23 15:31:06 2025
    From Newsgroup: comp.unix.shell

    Kaz Kylheku <643-408-1753@kylheku.com> writes:
    On 2025-08-23, Jim <zsd@jdvb.ca> wrote:
    On 2025-08-22 at 20:05 ADT, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
    On 23.08.2025 00:40, Keith Thompson wrote:

    Yes. I think that for some GNU tools, the info and man documents
    contain the same information. For others, the man page is just a brief >>>> summary, sometimes generated from "--help" output with "help2man".

    I've meanwhile looked also into the size of the man pages...

    Number of man pages with number of lines
    512 with 1..40 lines
    1641 with 41..200 lines
    781 with 201..1000 lines
    159 with 1001..5000 lines
    28 with 5001..20000 lines

    That doesn't appear to be just irrelevant information, at least.

    Is that 20000 tight? That is, are there man pages that big, or did your
    histogramization (?) arbitrarily pick 20000?

    $ man txr | wc
    46266 382645 2775327

    No, hold it, correction. I have a wide terminal. We have to measure
    using the 80 column standard:

    $ MANWIDTH=80 man txr | wc
    67616 386241 3110809

    That's more like it!

    I don't have txr on my system, but :

    $ MANWIDTH=80 man ffmpeg-all 2>/dev/null | wc
    49196 210446 1764012

    That omits the troff "cannot break line" and "cannot adjust line"
    warnings.
    --
    Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
    void Void(void) { Void(); } /* The recursive call of the void */
    --- Synchronet 3.21b-Linux NewsLink 1.2