jeaye/stdman

Can't open man page for std::ref and others

k4rtik opened this issue · 9 comments

$ man std::ref
No manual entry for std::ref

while

$ man -k std::ref
std::ref,std::cref(3), std::ref(3), std::cref(3) - std::ref,std::cref
std::reference_wrapper(3) - std::reference_wrapper
std::reference_wrapper::get,std::reference_wrapper::operatorT&(3), std::reference_wrapper::get(3), std::reference_wrapper::operatorT&(3) - std::reference_wrapper::get,std::reference_wrapper::operatorT&
std::reference_wrapper::operator()(3) - std::reference_wrapper::operator()
std::reference_wrapper::operator=(3) - std::reference_wrapper::operator=
std::reference_wrapper::reference_wrapper(3) - std::reference_wrapper::reference_wrapper

The following works:

$ man std::ref,std::cref
jeaye commented

On Sat, May 28, 2016 at 08:08:42PM -0700, Kartik Singhal wrote:

$ man std::ref
No manual entry for std::ref

while

$ man -k std::ref
std::ref,std::cref(3), std::ref(3), std::cref(3) - std::ref,std::cref
std::reference_wrapper(3) - std::reference_wrapper
std::reference_wrapper::get,std::reference_wrapper::operatorT&(3), std::reference_wrapper::get(3), std::reference_wrapper::operatorT&(3) - std::reference_wrapper::get,std::reference_wrapper::operatorT&
std::reference_wrapper::operator()(3) - std::reference_wrapper::operator()
std::reference_wrapper::operator=(3) - std::reference_wrapper::operator=
std::reference_wrapper::reference_wrapper(3) - std::reference_wrapper::reference_wrapper

Hey there. The std::ref is grouped with std::cref on cppref, so they're
grouped automatically here, too. You can tell by reading the first line
of the man -k std::ref output, after the dash.

You need to run: man std::ref,std::cref

@jeaye yes, I figured that out, but it reduces the utility of man page. It would be awesome and save some keystrokes if one could just do a man std::ref or man std::cref and reach the same man page. Most C-related functions allow that, e.g. see man getc and man getchar.

jeaye commented

Agreed!

More annoyance when even search doesn't work:

$ man -k std::cin
std::cin: nothing appropriate.
$ man std::cin std::wcin
No manual entry for std::cin
No manual entry for std::wcin
$ man std::cin,std::wcin # works
jeaye commented

On Tue, Jun 21, 2016 at 11:41:11AM -0700, Kartik Singhal wrote:

More annoyance when even search doesn't work:

$ man -k std::cin
std::cin: nothing appropriate.
$ man std::cin std::wcin
No manual entry for std::cin
No manual entry for std::wcin
$ man std::cin,std::wcin # works

Searching should work, and the merging of those is a known issue (cppref
merges them into one page, so they end up as one man page). Have you run
sudo updatedb, as the install process suggests? Without it, your
searches won't work.

@jeaye oh yes, you are right. I recently installed stdman on a new Linux machine and probably missed to run the sudo mandb step (not updatedb). Works fine now. Thanks!

jeaye commented

On Tue, Jun 21, 2016 at 01:21:19PM -0700, Kartik Singhal wrote:

@jeaye oh yes, you were right. I recently installed stdman on a new Linux machine and probably missed to run the sudo mandb step (not updatedb). Works fine now. Thanks!

Ah, right my mistake. I keep it in the install process for people like
me, who forget the right commands all the time. :)

As a workaround, some versions of man allow you to use * for globbing, so you can do man std::ref\*.

Closing this as things that I complained about seem to be working find now. 😄