-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
Allow indexing from end #2517
Comments
The idea, is from a relatively new feature in c# Related Docs: |
Just noting that I've seen this and will be considering it. I don't recall if there are any complications involved here, but generally, it feels like a reasonable request, assuming the logic fits well with what we are doing. |
Some comments on the proposal.
|
Description
In the current state, when including specific line numbers, we can target specific lines.
myfile:3
myfile::10
myfile:4:12
myfile:3:3
BUT, what if we wanted to include the last 10 lines of the file. There currently is not a way to index from the end of the file.
Benefits
Easy feature, which adds more utility, for potentially niche use-cases.
Solution Idea
Add the ability to do negative indexing:
Given, a file that is 100 lines long-
myfile:-3
myfile::-51
myfile:4:-25
myfile:-0:-0
The text was updated successfully, but these errors were encountered: