in reply to Re^5: Request for an update to: What shortcuts can I use for linking to other information?
in thread Request for an update to: What shortcuts can I use for linking to other information?

This was indeed a struggle. taint discovered that using [man://cmdname] did not do the same thing as typing man cmdname on their freeBSD box, which surprised them. They had not noticed that the [man://] links generate a url with &manpath=SuSE+Linux/i386+11.3, specifying the OS/distro man pages to display results for. In What shortcuts can I use for linking to other information? it states "Unix man pages:".

For the sake of reducing any ambiguity I think that the text associated with this section should state that the lookup will check for a particular OS/distro, and name it explicitly. A more complicated change would be to alter how [man://] links work so that users could specify which OS/distro was linked to, however since this could be achieved using the current method for linking e.g. [http://foo.com?bar=baz|man baz], this is overkill IMHO.

  • Comment on Re^6: Request for an update to: What shortcuts can I use for linking to other information?
  • Select or Download Code

Replies are listed 'Best First'.
Re^7: Request for an update to: What shortcuts can I use for linking to other information?
by jdporter (Paladin) on Dec 06, 2013 at 18:44 UTC

    Thank you.

    As it turns out, the [man://] shortcut already had the capability to link to FreeBSD pages instead of SuSE Linux, optionally. It also lets you specify which section of the man you want (e.g. time(3) rather than time(1)). You can even specify which version of the man you want, if you don't want the default (which currently is 11.2 for SuSE, 8.0 9.2 for FreeBSD).

    I have updated the doco.

    That said, I think it would be good to let one specify one of the other available man page sets. I see OpenBSD, CentOS, Darwin, NetBSD, HP-UX, RedHat, SunOS, and various other oddities.

    And then the bigger question, really, is: which of these should be the default? I seem to recall choosing to make SuSE the default since it was far more complete than FreeBSD. Probably still is.

    see 720039

    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.

      Well thanks for looking into this and updating the page in question. Good news that this functionality already existed, as for the default I'm not sure which it should be, I've not had to compare such documentation against one another for some time. Thanks again.

      And then the bigger question, really, is: which of these should be the default?

      I tried to pick the OS that was closest to Ubuntu, since, in my experience, Ubuntu has become the most common flavor of Unix. Certainly, I think a Linux flavor is a better choice than a FreeBSD flavor.

      - tye        

        "I think a Linux flavor is a better choice than a FreeBSD flavor. "
        I beg your pardon, tye!
        I strongly believe you're mistaken. :)

        --Chris

        Hey. I'm not completely useless. I can be used as a bad example.
        
      Thanks, jdporter.

      Sorry about the language. Seems in my effort to ensure any/everyone understands what I'm trying to say. I end up using too many words, and ultimately only obscure my message.

      I'll work work on it. :)

      As you undoubtedly already know
      manpath=FreeBSD+9.2-RELEASE
      is the key to the chosen OS version of man page to grep for the command.
      Knowing what I do about the script, and just now experimenting with your implemented schortcut. The following provides the BSD version for the command rehash
      [man://rehash=default]

      While that'll help help me maybe that'll help others, should it be documented along with the rest of the man page shortcut info.
      Experimenting further, indicates that the same strategy also works for HPUX
      [man://rehash=HPUX]
      So I guess, for now, that's the magic. Not terribly hard. Maybe you can somehow even improve further. I couldn't know, as I've never seen your code. Just thought I'd mention it.

      FWIW My offer still stands, for hosting any variation of man pages you might find advantageous.

      Thanks again, jdporter. I hope this helped. :)

      --Chris

      UPDATE: I just read your updated docs, and notice my strategy here, differs from the strategy you used to update the docs. Good, huh? Everybody loves having choices/options. :)
      Hey. I'm not completely useless. I can be used as a bad example.
      

        I just discovered some additional information that might be of interest;

        Much in the same way external links here, can be tailored so as to be named, with a pipe. So too, can the man pages here:
        [man://man=default|FreeBSD man pages ROCK!]
        becomes:
        FreeBSD man pages ROCK!

        Cool, huh? :)

        Hey. I'm not completely useless. I can be used as a bad example.