We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
My code needs to input multi-line strings as a single value. Entirety of the test code I created to test this issue:
require 'optimist' opts = Optimist::options do opt :foo, 'foobar', short:none, type: :string end puts "foo is #{opts[:foo]}"
Command that works:
ruby rubyfile.rb --foo "bar baz qux"
Output of command that works:
foo is bar baz qux
Command that produces error:
ruby rubyfile.rb --foo="bar baz qux"
Output of command that produces error:
foo is bar
The text was updated successfully, but these errors were encountered:
cc @kbrock
Sorry, something went wrong.
I was able to fix this by changing this line
- when /^--(\S+?)=(.*)$/ # long argument with equals + when /^--(\S+)=([\s\S]*)/ # long argument with equals
It looks like the . in .* doesn't consider newlines. There's probably a better way... because regex.
.
.*
The original regex is weird anyway. Not sure why it would consume from the = to the end of line?
=
No branches or pull requests
My code needs to input multi-line strings as a single value.
Entirety of the test code I created to test this issue:
Command that works:
Output of command that works:
Command that produces error:
Output of command that produces error:
The text was updated successfully, but these errors were encountered: