jeaye / stdman

Formatted C++20 stdlib man pages (cppreference)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot completion when pressing man std::string:: + tab

ltang666 opened this issue · comments

commented

I saw the gif that pressing std::string:: + tab will show all std::string's sub function, but it didn't show anything. output is as follows:

man std::string:: 
No manual entry for std::string::

os : linux centos6.2

Hey there! Thanks for taking interest in stdman and hopefully we can get this resolved for you. To get some more info, will you answer these questions:

  1. Did you install stdman? :)
  2. Did you run sudo mandb after the install?
  3. Does man std::string show the stdman man page properly?
  4. Do you have bash-completion installed? (yum install bash-completion -y)

Cheers!

commented

1、installed stdman and export MANPATH=/usr/local/man:/usr/local/share/man:/usr/share/man:/usr/man:/home/tang/work/stdman/share/man:/home/tang/work/stdman/man
2、run sudo makewhatis according answers from https://www.linuxquestions.org/questions/linux-newbie-8/mandb-command-not-found-4175473024/
because mandb: command not found.
3、man std::string works.
4、installed bash-completion.

but still not work.

I used the same machines with others, so I don't want to have an effect on others. so I export MANPATH in my own bashrc.

Thanks for the quick update and good information!

  1. After installing bash-completion, did you reboot or open a new terminal or source the proper scripts?
  2. Does man std::string::c_str work? (just to prove that it's there to be completed)
  3. Are you using bash or some other shell?

Exporting MANPATH in your ~/.bashrc should work just fine, so it's likely a different problem. When you run man std::string, what does it look like? Does the very bottom line, in the left, say a version number or does it say libstdc++? If it says libstdc++, then the man page you're seeing for man std::string is from GCC and not from stdman and our issue is with pathing. Otherwise, this seems like an issue with your shell and bash completion.

commented

I forgot to change to a new terminal.
Now it works.
using bash.
both bash-completion and sudo makewhatis is needed for stdman works?
some one may not have root privilege.

makewhatis/mandb need to be run by root, but many systems may already have a cron job for doing this. If you want to use the man pages right away, without specifying their full path, the commands will likely be needed.

Glad things are working for you!