OptionParser patch

T

Tom Pollard

Hi,

I wanted to submit a patch for optparse.rb to make it easier to add
general text to the usage summary. There were three things I wanted
to change:

1. Fix OptionParser#separator so that it correctly handles strings
containing newlines.
2. Introduce 'text' as and alias for the 'separator' method, since
the latter doesn't sound appropriate for adding a paragraph of text
at a time.
3. Add a 'bottom_text' method, which would force the text to appear
after the option summary.

Before I submitted this, I thought I'd ask for comments, or
additional suggestions.

Thanks,

Tom
 
T

Tomas Pospisek's Mailing Lists

Hi,

I wanted to submit a patch for optparse.rb to make it easier to add general
text to the usage summary. There were three things I wanted to change:

1. Fix OptionParser#separator so that it correctly handles strings containing
newlines.
2. Introduce 'text' as and alias for the 'separator' method, since the latter
doesn't sound appropriate for adding a paragraph of text at a time.
3. Add a 'bottom_text' method, which would force the text to appear after the
option summary.

Before I submitted this, I thought I'd ask for comments, or additional
suggestions.

I only comment on the last item, since I don't know OptionParser enough.
#3 sounds really useful to me.
*t
 
T

Tom Pollard

I only comment on the last item, since I don't know OptionParser
enough. #3 sounds really useful to me.
*t

Thanks.

I've submitted it now (my first patch to a core lib). I'm interested
to see what happens.

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,281
Latest member
Pedroaciny

Latest Threads

Top