homebrew-core icon indicating copy to clipboard operation
homebrew-core copied to clipboard

man-db: caveat: gapropos/gwhatis require gmandb

Open krobelus opened this issue 1 month ago • 2 comments

As reported in https://github.com/fish-shell/fish-shell/discussions/12062,

$ brew install man-db
$ echo >>~/.zprofile 'PATH="/opt/homebrew/opt/man-db/libexec/bin:$PATH"'

breaks commands like

$ apropos zsh
zsh: nothing appropriate

until the user runs "gmandb".

This has caused confusion because fish shell uses "apropos" to compute completions for the "man" command.

Maybe we can find a reliable way to:

  1. either run "gmandb" automatically as needed (maybe we should ask "man-db" upstream to make this the responsibility of "apropos" and "whatis").
  2. or at least detect this case (user trying to use "gaprops" with empty "/opt/homebrew/var/cache/man/") and tell them to run "gmandb".

Until then, add a caveat telling the user to run "gmandb" (or "mandb" I guess).

At the risk of being patronizing, emphasize that this is more likely to be necessary if the user makes "apropos" run "gapropos" because of cases like fish. Happy to remove this.

krobelus avatar Nov 16 '25 05:11 krobelus

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Dec 09 '25 00:12 github-actions[bot]

yikes

krobelus avatar Dec 09 '25 05:12 krobelus