0

I got abnormal manpath in man -k . or apropos .:

  1. duplicate shows:

    $ man -k . | grep -w apropos
    man(1), apropos(1), whatis(1) - display online manual documentation pages
    man(1), apropos(1), whatis(1) - display online manual documentation pages
    
    $ man -k . | wc -l
    15256
    $ man -k . | sort -u | wc -l
    11457
    

    enter image description here

  2. some of manpage can be show via man <name> but cannot be filter by man -k ., i.e.:

    $ man fzf | sed -r '/^\s*$/d' | head -3
    fzf(1)                 fzf - a command-line fuzzy finder                fzf(1)
    NAME
           fzf - a command-line fuzzy finder
    
    $ man -k . | grep fzf
    
    # can be found in `/usr/local/share/man`
    $ fd --glob "*fzf*" /usr/local/share/man
    /usr/local/share/man/man1/fzf-tmux.1
    /usr/local/share/man/man1/fzf.1
    

    enter image description here

here are environment:

# /etc/man.conf
$ cat /etc/man.conf | sed -r '/^(#.*)$/d;/^\s*$/d'
MANPATH     /usr/share/man
MANPATH     /usr/local/share/man
MANPATH     /usr/X11/man
MANPATH     /Library/Apple/usr/share/man
MANSECT     1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o

# /etc/manpaths
$ command cat /etc/manpaths
/usr/share/man
/usr/local/share/man

$ [[ -z $MANPATH ]] && echo '$MANPATH is empty' || echo $MANPATH
$MANPATH is empty

# manpath
$ manpath | tr ':' '\n'
/Users/marslo/perl5/man
/Users/marslo/.local/share/man
/usr/local/Cellar/[email protected]/71.1/share/man
/usr/local/vim/share/man
/Applications/MacVim.app/Contents/man
/usr/local/opt/llvm/share/man
/usr/local/opt/util-linux/share/man
/usr/local/opt/gnu-getopt/share/man
/usr/local/opt/binutils/share/man
/usr/local/opt/ruby/share/man
/usr/local/opt/tcl-tk/share/man
/usr/local/Cellar/node/21.1.0/share/man
/usr/local/Cellar/openjdk/21.0.2/libexec/openjdk.jdk/Contents/Home/man
/usr/local/opt/ed/share/man
/usr/local/opt/git-extras/share/man
/usr/local/opt/gettext/share/man
/usr/local/opt/file-formula/share/man
/usr/local/opt/openldap/share/man
/usr/local/opt/curl/share/man
/usr/local/opt/openssl/share/man
/usr/local/opt/libiconv/share/man
/usr/local/opt/sqlite/share/man
/usr/local/share/man
/usr/local/man
/usr/share/man
/Library/Apple/usr/share/man
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man
/Applications/Xcode.app/Contents/Developer/usr/share/man
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man

bins:

$ type apropos; which -a apropos
apropos is hashed (/usr/bin/apropos)
/usr/bin/apropos

$ type man; which -a man
man is hashed (/usr/bin/man)
/usr/bin/man

os:

$ sw_vers
ProductName:        macOS
ProductVersion:     14.3
BuildVersion:       23D56

0

You must log in to answer this question.

Browse other questions tagged .