Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ltang666 opened this issue Aug 23, 2017 · 5 comments
Closed

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

ltang666 opened this issue Aug 23, 2017 · 5 comments

Comments

@ltang666
Copy link

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

@jeaye
Copy link
Owner

jeaye commented Aug 24, 2017

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!

@ltang666
Copy link
Author

ltang666 commented Aug 24, 2017

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.

@jeaye
Copy link
Owner

jeaye commented Aug 24, 2017

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.

@ltang666
Copy link
Author

ltang666 commented Aug 24, 2017

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.

@jeaye
Copy link
Owner

jeaye commented Aug 24, 2017

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants