Generic way to paginate output of IRB or Rails console
-
07-11-2019 - |
题
The output of an IRB command is often too large for one "screen" (even if I scroll up - I am using Windows - I cannot get to the start of the output).
Is there a generic way to scroll/paginate through the output of IRB/Rails console. In Unix you use "| more" or "| less" to do so, but that doesn't work in IRB.
The workaround I am using now is to apply ranges on enumerables, example:
puts YAML::dump User.methods.sort[0..50]
puts YAML::dump User.methods.sort[50..100]
etc...
I've also seen extra plugins to install or monkeypatching IRB, but I was wondering whether there was something natively built in...
没有正确的解决方案
不隶属于 StackOverflow