-
Notifications
You must be signed in to change notification settings - Fork 102
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
NoWrappingWrapper removes newlines from help output? #107
Conversation
Damn, you are right. I think my thinking was that it should remove all On Thu, Sep 27, 2012 at 12:31 PM, Dave Strock notifications@git.luolix.topwrote:
|
No worries. Thinking about it now NoWrappingWrapper is really a SingleLineWrapper, or something like that. Anyway, I won't have time to test until tonight, but is something simple like this commit what you're looking for? Also, is there still value in the NoWrappingWrapper or should we just replace it with an implementation that actually doesn't wrap at all? |
Yeah, I'd leave the |
Related to #107, this class is somewhat braindead, but at least it's now named more appropriately.
Merged this in, with a slight change to the name (called in "Verbatim", but your help option works, too). It's up on rubygems as 2.3.0.rc1. Can you give it a try? The one thing I wasn't sure about was that the output is still indented underneath Thanks! |
Sorry, I got busy this weekend and wasn't able to work on this. Thanks for going ahead with it. I'm going to give it a look right now and get back to you. Also, I much prefer "verbatim" to "do_nothing". I think that's a good choice. |
OK, I think 2.3.0.rc1 is good enough for now. Its not exactly what I expected because it actually only indents the first line of the command description (due to the spaces in the ERB template in command_help_format.rb). So it ends up with something like: DESCRIPTION Only the first line is indented when description text is more than one line. It looks slightly weird, but it is totally usable and suits my needs. Thinking about it now, I think maybe what I want is an If that becomes a real burden, I'll submit another PR to fix it ;) |
That is weird; for me it seemed to indent each line. Man, who knew On Tue, Oct 2, 2012 at 11:47 AM, Dave Strock notifications@git.luolix.topwrote:
|
This is up now in 2.3.0. If the indenting is bugging you, I'm up for changing it. |
Why does the NoWrappingWrapper remove newlines from help output? Thats exactly what I expected it not to do.
I want to be able to include things like tables and CLI usage examples:
long_desc """
Example:
$ app command
=> Does something to the first thing!
$ app command -a
=> Does something to all the things!
"""
Now, even with NoWrappingWrapper, I get an output like this:
$ app help command
Example: $ app command => Does something to the first thing! $ app command -a => Does something to all the things!
Whats the best way to handle this?
Should we create a new DoNothingWrapper that actually doesn't reformat the help text at all? Or should NoWrappingWrapper actually behave this way?