You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to propose additional arguments of whereami that behaves as described below↓.
whereamin1n2#=> shows lines from current_line_num - n1 to current_line_num + n2# whereami n behaves the same way as before.
Reason
I realize this additional argument of whereami by overriding some methods in my .pryrc (shown in the bottom), and have found it useful, especially when using binding.pry.
In my case, I set an alias of whereami 10 30 (and one with -n) to show the lines before and after the current line as a ratio of 1:3 which fits the height of my terminal.
The main idea is that we care less about the previous lines, but we care more about the following lines when using binding.pry, since we
check how many lines to go next or continue.
copy and paste methods below the current line.
You can use whereami 30 to show many lines, but you have to scroll down and type q to exit, which takes time. This is almost the same when using whereami [-m|-c|-f].
If you use whereami n1 n2, you can determine how many lines to show before and after the current line, which is great.
I gave an example of my binding.pry workflow, but since the command is versatile, it can be applied in various situations.
Summary
In short, I propose the feature for the following reasons.
It is a versatile feature that could be useful in various situations. My binding.pry workflow is one example.
For users, the feature is pure addition, so it does not change the existing behavior of whereami and other commands.
I think it could be implemented without impacting gems dependent on pry.
I'd be happy to hear your thoughts, and implement the feature if it is accepted!
Requested feature
I'd like to propose additional arguments of whereami that behaves as described below↓.
Reason
I realize this additional argument of whereami by overriding some methods in my .pryrc (shown in the bottom), and have found it useful, especially when using binding.pry.
In my case, I set an alias of
whereami 10 30
(and one with -n) to show the lines before and after the current line as a ratio of 1:3 which fits the height of my terminal.The main idea is that we care less about the previous lines, but we care more about the following lines when using binding.pry, since we
You can use
whereami 30
to show many lines, but you have to scroll down and type q to exit, which takes time. This is almost the same when usingwhereami [-m|-c|-f]
.If you use
whereami n1 n2
, you can determine how many lines to show before and after the current line, which is great.I gave an example of my binding.pry workflow, but since the command is versatile, it can be applied in various situations.
Summary
In short, I propose the feature for the following reasons.
I'd be happy to hear your thoughts, and implement the feature if it is accepted!
(The codes in my .pryrc↓)
The text was updated successfully, but these errors were encountered: