T
Tom Pollard
Hi,
I'd like to add a paragraph of text to my usage message, describing
the non-option arguments accepted by my script. I don't see any way
to do that in the OptionParser api; have I missed something? The
closest thing I see is the separator() method, but it appears to
expect only a single line of text. I tried using
opts = OptionParser.new do |opts|
opts.banner = "Usage: #$0 [options] [terms]"
opts.separator "Options:"
opts.on( ... )
opts.separator <<-EOF
My lucid expository text here,
complete with examples
and clever insights.
EOF
end
...hoping this would produce a paragraph that looked like
My lucid expository text here,
complete with examples
and clever insights.
But the final paragraph was interspersed with blank lines, and looked
like this
My lucid expository text here,
complete with examples
and clever insights.
Is this possible with OptionParser?
Thanks,
Tom
I'd like to add a paragraph of text to my usage message, describing
the non-option arguments accepted by my script. I don't see any way
to do that in the OptionParser api; have I missed something? The
closest thing I see is the separator() method, but it appears to
expect only a single line of text. I tried using
opts = OptionParser.new do |opts|
opts.banner = "Usage: #$0 [options] [terms]"
opts.separator "Options:"
opts.on( ... )
opts.separator <<-EOF
My lucid expository text here,
complete with examples
and clever insights.
EOF
end
...hoping this would produce a paragraph that looked like
My lucid expository text here,
complete with examples
and clever insights.
But the final paragraph was interspersed with blank lines, and looked
like this
My lucid expository text here,
complete with examples
and clever insights.
Is this possible with OptionParser?
Thanks,
Tom