Results 1 to 9 of 9

Thread: Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this)?

  1. #1

    Default Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this)?

    Today I wanted to add color to man pages so I first tried to use "most". I installed "most" package and used
    Code:
    export PAGER="most"
    Then I read that using less is better than most on Arch wiki, so I uninstalled most immediately and added these lines in .bashrc.

    Code:
    ~/.bashrc man() {
        env LESS_TERMCAP_mb=$'\E[01;31m' \
        LESS_TERMCAP_md=$'\E[01;38;5;74m' \
        LESS_TERMCAP_me=$'\E[0m' \
        LESS_TERMCAP_se=$'\E[0m' \
        LESS_TERMCAP_so=$'\E[38;5;246m' \
        LESS_TERMCAP_ue=$'\E[0m' \
        LESS_TERMCAP_us=$'\E[04;38;5;146m' \
        man "$@"
    }
    and did
    Code:
    source ~/.bashrc
    Now I find that most times when I do a man command there is this result.
    Code:
    man kill
    Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this)
     * kill (1)
       kill (2)
       kill (1p)
       kill (3p)
    Man: What manual page do you want?
    Man:
    How do I fix this so there's not extra question for using man pages, or it is normal?

    Thanks.
    openSUSE Leap 15.0

  2. #2
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,702

    Default Re: Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this)?

    It is normal but the question is answered by the man command

    (set MAN_POSIXLY_CORRECT to avoid this)

  3. #3

    Default Re: Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this)?

    Quote Originally Posted by gogalthorp View Post
    It is normal but the question is answered by the man command

    (set MAN_POSIXLY_CORRECT to avoid this)
    I have no understanding what it means, so I did "set MAN_POSIXLY_CORRECT" in terminal but it doesn't change anything.
    openSUSE Leap 15.0

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Man: find all matching manual pages (set MAN_POSIXLY_CORRECT toavoid this)?

    On 2015-08-09 14:36, bonedriven wrote:

    > How do I fix this so there's not extra question for using man pages, or
    > it is normal?


    It is normal.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  5. #5
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,493
    Blog Entries
    3

    Default Re: Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this)?

    Quote Originally Posted by bonedriven View Post
    I have no understanding what it means, so I did "set MAN_POSIXLY_CORRECT" in terminal but it doesn't change anything.
    Try:
    Code:
    MAN_POSIXLY_CORRECT=1
    export MAN_POSIXLY_CORRECT
    


    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  6. #6

    Default Re: Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this)?

    Quote Originally Posted by nrickert View Post
    Try:
    Code:
    MAN_POSIXLY_CORRECT=1
    export MAN_POSIXLY_CORRECT
    


    Thanks, it does work. Guess I need to put it in .bashrc to make the change permanent.

    Since it is normal I'll leave it as it is for now.
    openSUSE Leap 15.0

  7. #7
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Man: find all matching manual pages (set MAN_POSIXLY_CORRECT toavoid this)?

    On 2015-08-09 14:56, bonedriven wrote:

    > I have no understanding what it means, so I did "set
    > MAN_POSIXLY_CORRECT" in terminal but it doesn't change anything.


    Code:
    MAN_POSIXLY_CORRECT=1 man kill
    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Man: find all matching manual pages (set MAN_POSIXLY_CORRECT toavoid this)?

    On 2015-08-09 16:06, bonedriven wrote:
    > Since it is normal I'll leave it as it is for now.


    Well, you see, when you ask for "man kill", it tells you that there are
    four manuals with the same name, so which one do you want? You can hide
    the question and get the first hit automatically, but maybe the
    information you seek is in another of the manuals.

    You could instead call "man 2 kill" to get the "2" variant.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  9. #9
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,702

    Default Re: Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this)?

    MAN_POSIXLY_CORRECT is just an environmental variable like you would have in windows. You can set it any where maybe in one of the startup scripts.

    ~/.bashrc might be a good place this is run at the start of bash

    Note that if you wait about 10 secs the default will be auto chosen or pressing enter takes you to the default. It is helpful to have the choice since not all man files have all the info you may want

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •