I seem to recall that the parsing multiple options code is "wonky" because
it has to deal with a legacy "comma separated string".  It may relate to
CLI-306

On Tue, May 28, 2024 at 6:16 PM Gary Gregory <garydgreg...@gmail.com> wrote:

> What about 'Hello World'?
>
> Gary
>
> On Tue, May 28, 2024, 11:13 AM Eric Pugh <ep...@opensourceconnections.com>
> wrote:
>
> > I may need to see if there is a unit test I can write, because on my Mac,
> > ‘Hello World” get’s turned into “Hello” and “World” as well :-(.
> >
> >
> >
> >
> >
> > > On May 28, 2024, at 10:57 AM, Gary Gregory <garydgreg...@gmail.com>
> > wrote:
> > >
> > > It depends on the operating system as the OS itself might do different
> > > things with both single-quotes and double-quotes.
> > >
> > > For example, on Linux/macOS, single quotes create a string that is not
> > > interpreted IIRC.
> > >
> > > Gary
> > >
> > > On Tue, May 28, 2024, 10:37 AM Eric Pugh <
> > ep...@opensourceconnections.com <mailto:ep...@opensourceconnections.com
> >>
> > > wrote:
> > >
> > >> Hi all, trying to figure out if I found a bug or if it’s user error.
> > >>
> > >> I have a command line:
> > >>
> > >> bin/solr stream -verbose echo.expr "Hello World”
> > >>
> > >> The -verbose is an option, and then the next two parameters I get via
> > >> System.out.print(cli.getArgList());.
> > >>
> > >> I would expect to get two parameters: “echo.expr” and “Hello World”,
> but
> > >> instead I get three, “echo.expr”, “Hello”, “World” because of the
> white
> > >> space.
> > >>
> > >> I am using the “DefaultParser”.   It seems to me that wrapping an
> option
> > >> in ‘ or “ quotes ought to let you ignore the whitespace!
> > >>
> > >> Thoughts?
> > >>
> > >> Eric
> > >>
> > >>
> > >> _______________________
> > >> Eric Pugh | Founder | OpenSource Connections, LLC | 434.466.1467 |
> > >> http://www.opensourceconnections.com <
> > >> http://www.opensourceconnections.com/> | My Free/Busy <
> > >> http://tinyurl.com/eric-cal>
> > >> Co-Author: Apache Solr Enterprise Search Server, 3rd Ed <
> > >>
> >
> https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw
> > >
> > >>
> > >> This e-mail and all contents, including attachments, is considered to
> be
> > >> Company Confidential unless explicitly stated otherwise, regardless of
> > >> whether attachments are marked as such.
> >
> > _______________________
> > Eric Pugh | Founder | OpenSource Connections, LLC | 434.466.1467 |
> > http://www.opensourceconnections.com <
> > http://www.opensourceconnections.com/> | My Free/Busy <
> > http://tinyurl.com/eric-cal>
> > Co-Author: Apache Solr Enterprise Search Server, 3rd Ed <
> >
> https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw
> >
> >
> > This e-mail and all contents, including attachments, is considered to be
> > Company Confidential unless explicitly stated otherwise, regardless of
> > whether attachments are marked as such.
> >
> >
>


-- 
LinkedIn: http://www.linkedin.com/in/claudewarren

Reply via email to