Hi Josh,
"subcommand" feature works.
In pratice, if you pass "foo bar" to man(1), it will
try /usr/share/man/man*/foo-bar.* first, then "foo" and "bar" separately.
Obviously, this is not very foolproof: in case of "man hg ssh", one wants to
read manuals for mercurial (hg) and ssh. *But* there's also "hg-ssh" available
(at least on my system), and that's not a hg subcommand.
$ man -w hg ssh
/usr/share/man/man8/hg-ssh.8.gz
$ LANG=C hg ssh 1>/dev/null
hg: unknown command 'ssh'
$
So, we could (*could*, haven't written a single line of code yet) provide some
completions, but not very foolproof:
$ whatis -w 'git-*' | awk '{print $1}' | sed -e "s/git-//g" | head -n3
add
am
annotate
$ whatis -w 'hg-*' | awk '{print $1}' | sed -e "s/hg-//g" | head -n3
ssh
$
I'll give it a try :)
David