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
Paginate help output? #314
Comments
|
I monkey patched it for now, but if there's a more elegant way, I'd love to hear. If it's not already an option and I missed it, might be nice to have the ability to pipe the help command output as needed. |
|
Hmm, yeah this seems like a good feature, but I'm not sure exactly how to achieve this. Can you share what you did? The only thing I can think of is to have |
|
I just did a very dirty monkey patch over the whole show_help function and changed the My pagination routine just detects the appropriate pager for the system based on GIT_PAGER, PAGER, and a cascade of potential executables (bat, less, more). If it finds a usable one, it uses IO.pipe to send text to it. Happy to share it, but I'm just bad enough at Ruby to by shy about it :). What I'd be interested in is just a block like |
Some of my subcommand help screens have gotten quite large between long_desc, flags/options and multiple examples. I have a pager built into my little app and I'm wondering if there's a way I could hook the help command to direct output through the pager so it works more the way that
git help(or evenman) does instead of requiring the user to scroll back up to see the first options.The text was updated successfully, but these errors were encountered: