You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Amey Jadiye <am...@gmail.com> on 2019/03/27 06:02:24 UTC

[CLI] Option arguments without - or --

Hi,

I'm developing a console application and required to get the command and
argument in non traditional fashion where command name dont start with
-name=value or --name=value.

I expect the cli library should handle in below fashion

Push 1 2 3 4
Pull 5 8 9

Where push and Pull is command proceed with their arguments.

I searched the library but didn't found such option, does anyone know how
to achieve this with Apache Commons CLI ?

If this functionality is not present I can contribute in couple of weeks.

Regards,
Amey

Re: [CLI] Option arguments without - or --

Posted by Amey Jadiye <am...@gmail.com>.
On Fri, Mar 29, 2019 at 3:41 PM sebb <se...@gmail.com> wrote:

> On Fri, 29 Mar 2019 at 07:04, Amey Jadiye <am...@gmail.com> wrote:
> >
> > Hi,
> >
> > Looks like the functionality is not present in the code base.
> >
> > I'm proposing the SimpleCommandParser which can implement
> CommandLineParser
> > for achieving below requirements. let me know your thoughts on this.
>
> Thanks for the suggestion.
>
> However, unless I have misunderstood the requirement, parsing looks to
> be trivial and not worth the additional effort of creating and
> maintaining library code.
>
well, In that case existing code should be made flexible enough to meet the
requirement.
I'll think about the changes and raise PR.

>
> It also seems to be a very uncommon use case, so I doubt that many
> people would use the code.
>
> > Regards,
> > Amey
> >
> > On Wed, Mar 27, 2019 at 11:32 AM Amey Jadiye <am...@gmail.com>
> wrote:
> >
> > > Hi,
> > >
> > > I'm developing a console application and required to get the command
> and
> > > argument in non traditional fashion where command name dont start with
> > > -name=value or --name=value.
> > >
> > > I expect the cli library should handle in below fashion
> > >
> > > Push 1 2 3 4
> > > Pull 5 8 9
> > >
> > > Where push and Pull is command proceed with their arguments.
> > >
> > > I searched the library but didn't found such option, does anyone know
> how
> > > to achieve this with Apache Commons CLI ?
> > >
> > > If this functionality is not present I can contribute in couple of
> weeks.
> > >
> > > Regards,
> > > Amey
> > >
> > >
> >
> > --
> >
> > ---------------------------------------------------------------------
> >
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >
> > For additional commands, e-mail: dev-help@commons.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

-- 

---------------------------------------------------------------------

To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org

For additional commands, e-mail: dev-help@commons.apache.org

Re: [CLI] Option arguments without - or --

Posted by sebb <se...@gmail.com>.
On Fri, 29 Mar 2019 at 07:04, Amey Jadiye <am...@gmail.com> wrote:
>
> Hi,
>
> Looks like the functionality is not present in the code base.
>
> I'm proposing the SimpleCommandParser which can implement CommandLineParser
> for achieving below requirements. let me know your thoughts on this.

Thanks for the suggestion.

However, unless I have misunderstood the requirement, parsing looks to
be trivial and not worth the additional effort of creating and
maintaining library code.

It also seems to be a very uncommon use case, so I doubt that many
people would use the code.

> Regards,
> Amey
>
> On Wed, Mar 27, 2019 at 11:32 AM Amey Jadiye <am...@gmail.com> wrote:
>
> > Hi,
> >
> > I'm developing a console application and required to get the command and
> > argument in non traditional fashion where command name dont start with
> > -name=value or --name=value.
> >
> > I expect the cli library should handle in below fashion
> >
> > Push 1 2 3 4
> > Pull 5 8 9
> >
> > Where push and Pull is command proceed with their arguments.
> >
> > I searched the library but didn't found such option, does anyone know how
> > to achieve this with Apache Commons CLI ?
> >
> > If this functionality is not present I can contribute in couple of weeks.
> >
> > Regards,
> > Amey
> >
> >
>
> --
>
> ---------------------------------------------------------------------
>
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>
> For additional commands, e-mail: dev-help@commons.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [CLI] Option arguments without - or --

Posted by Amey Jadiye <am...@gmail.com>.
Hi,

Looks like the functionality is not present in the code base.

I'm proposing the SimpleCommandParser which can implement CommandLineParser
for achieving below requirements. let me know your thoughts on this.

Regards,
Amey

On Wed, Mar 27, 2019 at 11:32 AM Amey Jadiye <am...@gmail.com> wrote:

> Hi,
>
> I'm developing a console application and required to get the command and
> argument in non traditional fashion where command name dont start with
> -name=value or --name=value.
>
> I expect the cli library should handle in below fashion
>
> Push 1 2 3 4
> Pull 5 8 9
>
> Where push and Pull is command proceed with their arguments.
>
> I searched the library but didn't found such option, does anyone know how
> to achieve this with Apache Commons CLI ?
>
> If this functionality is not present I can contribute in couple of weeks.
>
> Regards,
> Amey
>
>

-- 

---------------------------------------------------------------------

To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org

For additional commands, e-mail: dev-help@commons.apache.org