bash-completion ships tab completion for /usr/bin/man that identifies
specific manpages.
However, recent versions of man are clever enough to know that a request
for a subcommand like "man 1 git bisect" is not a request for two manpages
("git.1" and "bisect.1") but rather a request for the manpage for the
subcommand "git-bisect.1".
When i try to tab-complete the string "man git bis<TAB>" it would be
better if the tab completion would prduce "man git bisect ", rather than
what it currently does (on my system, it offers completions to "bison",
"bison.yacc", or "bisque").
man does this cleverness when the command name and subcommand name are
joined together in the manpage title by either a hyphen ("-") (e.g.,
"git-revert.1" from git) or underscore ("_") (e.g., "ipsec_show.8" from
libreswan).
There is some level of ambiguity here, of course: when the user runs
"man git commit", it produces git-commit.1, but when the user runs "man
commit git" it produces commit.7 (from postgresql-client-13) followd
git.1.
So when completing from "man XXX Y<TAB>", bash could include the
following candidates:
a) all manpage names that begin with XXX[-_]Y, with the XXX[-_] prefix
trimmed
b) all manpage names that begin with Y
From a usability perspective, most people are trying to read a single
manpage at a time. So i would argue that if (a) is non-empty, nothing
from (b) should be offered.
Similarly, if someone tries to complete "man XXX <TAB>", and subcommand
manpages exist, it would make more sense to offer the user only the
available subcommand manpages, not all possible manpages.