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

Checking the cppman page for keywords results in inconsistent answers. #175

Closed
Resparing opened this issue Aug 5, 2024 · 1 comment
Closed

Comments

@Resparing
Copy link

Resparing commented Aug 5, 2024

Checking the cppman page for certain keywords will result in a function, such as the page for an int, while other keywords will have their own pages, such as a double.

Steps to reproduce:

cppman double
cppman int
@aitjcize
Copy link
Owner

This was because cppman will find the first match it encountered. The int keyword does not have a page matching the keyword, so the closest page was returned. I've modify the logic of query in the latest commit, now if a keyword results in multiple matches, a menu will be presented for selection, for example:

$ bin/cppman Lambda
1. std::experimental::reflect::Lambda - std::experimental::reflect::Lambda
2. std::experimental::reflect::LambdaCapture - std::experimental::reflect::LambdaCapture
3. experimental::reflect::Lambda - std::experimental::reflect::Lambda
4. experimental::reflect::LambdaCapture - std::experimental::reflect::LambdaCapture
5. Lambda expressions(since C++11) - Lambda expressions (since C++11)

Please enter the selection: 

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