allow number parameter for --head and --tail #233
Merged
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.
Hey! I love aura and hope this is a welcome contribution!
This allows one to specify a specific number of items to include in the
--head
and--tail
options to the search command. This change is backwards-compatible in that the number parameter is optional. If the flag is called in the same way as it was before this change, the number is still assumed to be 10.In other words, the following continues to work, showing the first 10 results:
The following now works as well, showing the first 3 results:
The reason I made this was because the default value of 10 always scrolled the result I was interested in past my terminal height, since usually what I'm looking for is one of the first if not the first result.
It's working nicely :)