Open XtremeOwnageDotCom opened 3 days ago
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.
Easy feature, which adds more utility, for potentially niche use-cases.
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 idea, is from a relatively new feature in c#
Related Docs:
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