option: Add option to limit result list#187
Merged
aitjcize merged 1 commit intoaitjcize:masterfrom Jun 24, 2025
Merged
Conversation
aitjcize
approved these changes
Jun 24, 2025
Owner
aitjcize
left a comment
There was a problem hiding this comment.
This make sense, thanks.
The author list is auto generated, I'll update them before releasing the next version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
I got tons of results and would like to have fewer so the output doesn't autoscroll to the worst (maybe?) results.
example of what I did:
This auto-scrolled to the bottom which only has kinda horrible results. I'd like to just see the first 50 or 10 for example.
My change
I added another option:
-nor--max-resultswhich is set like:and if you set it to 1, it will just open the top result immediately.
Testing
I only tested this via python bin/cppman fuzzyterm -n/--max-results 1/10/15/100. I saw that as sufficient, but you know better so I can do more tests if you believe it needs it.
What I didn't do
I am only making this fork->change->PR and haven't made any updates changelog or contributor list. Also did nothing regarding making an executable from the python code, so that may not work? I am not sure how you do that part in this project :)