[DISCUSSION] Add autocompletion for commands in control.sh

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[DISCUSSION] Add autocompletion for commands in control.sh

Kirill Tkalenko
Hi, Igniters!

At the moment to work with the control.sh we need to know exactly what the name of the command and its options are and so the user can often make mistakes when using it. So I think it would be useful to do control.sh more user-friendly by adding autocomplete as in modern command-line utilities.

For this purpose, I suggest using framework [1] and to do this, take out control.sh together with its associated classes in a separate module such as "modules/control-utility".

Comments, suggestions?

[1] - https://picocli.info/
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Add autocompletion for commands in control.sh

Zhenya Stanilovsky


good catch ! it`s a little bit pain for now to working with it.

 
>Hi, Igniters!
>
>At the moment to work with the control.sh we need to know exactly what the name of the command and its options are and so the user can often make mistakes when using it. So I think it would be useful to do control.sh more user-friendly by adding autocomplete as in modern command-line utilities.
>
>For this purpose, I suggest using framework [1] and to do this, take out control.sh together with its associated classes in a separate module such as "modules/control-utility".
>
>Comments, suggestions?
>
>[1] -  https://picocli.info/ 
 
 
 
 
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Add autocompletion for commands in control.sh

antonovsergey93
It would be a great usability improvement!

+1 From me.

вт, 2 июн. 2020 г. в 15:54, Zhenya Stanilovsky <[hidden email]>:

>
>
> good catch ! it`s a little bit pain for now to working with it.
>
>
> >Hi, Igniters!
> >
> >At the moment to work with the control.sh we need to know exactly what
> the name of the command and its options are and so the user can often make
> mistakes when using it. So I think it would be useful to do control.sh more
> user-friendly by adding autocomplete as in modern command-line utilities.
> >
> >For this purpose, I suggest using framework [1] and to do this, take out
> control.sh together with its associated classes in a separate module such
> as "modules/control-utility".
> >
> >Comments, suggestions?
> >
> >[1] -  https://picocli.info/
>
>
>
>



--
BR, Sergey Antonov
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Add autocompletion for commands in control.sh

Ivan Daschinsky
+1 But this is not only usability improvement, but also a huge code
improvement. With picocli developers can add custom command without writing
a lot of boilerplate and error prone code to do a trivial task
of parsing CLI arguments. Cleaner code, less bugs also matter.

вт, 2 июн. 2020 г. в 16:02, Sergey Antonov <[hidden email]>:

> It would be a great usability improvement!
>
> +1 From me.
>
> вт, 2 июн. 2020 г. в 15:54, Zhenya Stanilovsky <[hidden email]
> >:
>
> >
> >
> > good catch ! it`s a little bit pain for now to working with it.
> >
> >
> > >Hi, Igniters!
> > >
> > >At the moment to work with the control.sh we need to know exactly what
> > the name of the command and its options are and so the user can often
> make
> > mistakes when using it. So I think it would be useful to do control.sh
> more
> > user-friendly by adding autocomplete as in modern command-line utilities.
> > >
> > >For this purpose, I suggest using framework [1] and to do this, take out
> > control.sh together with its associated classes in a separate module such
> > as "modules/control-utility".
> > >
> > >Comments, suggestions?
> > >
> > >[1] -  https://picocli.info/
> >
> >
> >
> >
>
>
>
> --
> BR, Sergey Antonov
>


--
Sincerely yours, Ivan Daschinskiy
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Add autocompletion for commands in control.sh

Maxim Muzafarov
Folks,

+1

However, AFAIK control.sh is the part of the ignite-core module with
zero dependencies from external resources.
Would it be better going the `control.sh` extensions-way?


By the way, according to README.md [1] the picocli is already using by
the Apache Ignite, right? :-)

> Picocli is used in the Apache Hadoop Ozone/HDDS command line tools, the Apache Hive benchmark CLI, has ** Apache [Ignite TensorFlow] **, and Apache Sling.


[1] https://github.com/remkop/picocli/blame/master/README.md#L199

On Tue, 2 Jun 2020 at 16:09, Ivan Daschinsky <[hidden email]> wrote:

>
> +1 But this is not only usability improvement, but also a huge code
> improvement. With picocli developers can add custom command without writing
> a lot of boilerplate and error prone code to do a trivial task
> of parsing CLI arguments. Cleaner code, less bugs also matter.
>
> вт, 2 июн. 2020 г. в 16:02, Sergey Antonov <[hidden email]>:
>
> > It would be a great usability improvement!
> >
> > +1 From me.
> >
> > вт, 2 июн. 2020 г. в 15:54, Zhenya Stanilovsky <[hidden email]
> > >:
> >
> > >
> > >
> > > good catch ! it`s a little bit pain for now to working with it.
> > >
> > >
> > > >Hi, Igniters!
> > > >
> > > >At the moment to work with the control.sh we need to know exactly what
> > > the name of the command and its options are and so the user can often
> > make
> > > mistakes when using it. So I think it would be useful to do control.sh
> > more
> > > user-friendly by adding autocomplete as in modern command-line utilities.
> > > >
> > > >For this purpose, I suggest using framework [1] and to do this, take out
> > > control.sh together with its associated classes in a separate module such
> > > as "modules/control-utility".
> > > >
> > > >Comments, suggestions?
> > > >
> > > >[1] -  https://picocli.info/
> > >
> > >
> > >
> > >
> >
> >
> >
> > --
> > BR, Sergey Antonov
> >
>
>
> --
> Sincerely yours, Ivan Daschinskiy
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Add autocompletion for commands in control.sh

Ivan Daschinsky
> By the way, according to README.md [1] the picocli is already using bythe
Apache Ignite, right? :-)
Yes, you are right, but a little bit outdated.

> Would it be better going the `control.sh` extensions-way?
Sounds good. Also, it would be great to incorporate in command line
utilities some features from visor-console also. And after developing new
tool, deprecate both (visor-console and control.sh)

вт, 2 июн. 2020 г. в 16:15, Maxim Muzafarov <[hidden email]>:

> Folks,
>
> +1
>
> However, AFAIK control.sh is the part of the ignite-core module with
> zero dependencies from external resources.
> Would it be better going the `control.sh` extensions-way?
>
>
> By the way, according to README.md [1] the picocli is already using by
> the Apache Ignite, right? :-)
>
> > Picocli is used in the Apache Hadoop Ozone/HDDS command line tools, the
> Apache Hive benchmark CLI, has ** Apache [Ignite TensorFlow] **, and Apache
> Sling.
>
>
> [1] https://github.com/remkop/picocli/blame/master/README.md#L199
>
> On Tue, 2 Jun 2020 at 16:09, Ivan Daschinsky <[hidden email]> wrote:
> >
> > +1 But this is not only usability improvement, but also a huge code
> > improvement. With picocli developers can add custom command without
> writing
> > a lot of boilerplate and error prone code to do a trivial task
> > of parsing CLI arguments. Cleaner code, less bugs also matter.
> >
> > вт, 2 июн. 2020 г. в 16:02, Sergey Antonov <[hidden email]>:
> >
> > > It would be a great usability improvement!
> > >
> > > +1 From me.
> > >
> > > вт, 2 июн. 2020 г. в 15:54, Zhenya Stanilovsky
> <[hidden email]
> > > >:
> > >
> > > >
> > > >
> > > > good catch ! it`s a little bit pain for now to working with it.
> > > >
> > > >
> > > > >Hi, Igniters!
> > > > >
> > > > >At the moment to work with the control.sh we need to know exactly
> what
> > > > the name of the command and its options are and so the user can often
> > > make
> > > > mistakes when using it. So I think it would be useful to do
> control.sh
> > > more
> > > > user-friendly by adding autocomplete as in modern command-line
> utilities.
> > > > >
> > > > >For this purpose, I suggest using framework [1] and to do this,
> take out
> > > > control.sh together with its associated classes in a separate module
> such
> > > > as "modules/control-utility".
> > > > >
> > > > >Comments, suggestions?
> > > > >
> > > > >[1] -  https://picocli.info/
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > BR, Sergey Antonov
> > >
> >
> >
> > --
> > Sincerely yours, Ivan Daschinskiy
>


--
Sincerely yours, Ivan Daschinskiy
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Add autocompletion for commands in control.sh

Kirill Tkalenko
In reply to this post by Maxim Muzafarov
Maxim I suggested moving control.sh in a separate module, are we talking about the same thing?

02.06.2020, 16:15, "Maxim Muzafarov" <[hidden email]>:

> Folks,
>
> +1
>
> However, AFAIK control.sh is the part of the ignite-core module with
> zero dependencies from external resources.
> Would it be better going the `control.sh` extensions-way?
>
> By the way, according to README.md [1] the picocli is already using by
> the Apache Ignite, right? :-)
>
>>  Picocli is used in the Apache Hadoop Ozone/HDDS command line tools, the Apache Hive benchmark CLI, has ** Apache [Ignite TensorFlow] **, and Apache Sling.
>
> [1] https://github.com/remkop/picocli/blame/master/README.md#L199
>
> On Tue, 2 Jun 2020 at 16:09, Ivan Daschinsky <[hidden email]> wrote:
>>  +1 But this is not only usability improvement, but also a huge code
>>  improvement. With picocli developers can add custom command without writing
>>  a lot of boilerplate and error prone code to do a trivial task
>>  of parsing CLI arguments. Cleaner code, less bugs also matter.
>>
>>  вт, 2 июн. 2020 г. в 16:02, Sergey Antonov <[hidden email]>:
>>
>>  > It would be a great usability improvement!
>>  >
>>  > +1 From me.
>>  >
>>  > вт, 2 июн. 2020 г. в 15:54, Zhenya Stanilovsky <[hidden email]
>>  > >:
>>  >
>>  > >
>>  > >
>>  > > good catch ! it`s a little bit pain for now to working with it.
>>  > >
>>  > >
>>  > > >Hi, Igniters!
>>  > > >
>>  > > >At the moment to work with the control.sh we need to know exactly what
>>  > > the name of the command and its options are and so the user can often
>>  > make
>>  > > mistakes when using it. So I think it would be useful to do control.sh
>>  > more
>>  > > user-friendly by adding autocomplete as in modern command-line utilities.
>>  > > >
>>  > > >For this purpose, I suggest using framework [1] and to do this, take out
>>  > > control.sh together with its associated classes in a separate module such
>>  > > as "modules/control-utility".
>>  > > >
>>  > > >Comments, suggestions?
>>  > > >
>>  > > >[1] - https://picocli.info/
>>  > >
>>  > >
>>  > >
>>  > >
>>  >
>>  >
>>  >
>>  > --
>>  > BR, Sergey Antonov
>>  >
>>
>>  --
>>  Sincerely yours, Ivan Daschinskiy
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Add autocompletion for commands in control.sh

Kirill Tkalenko
Folks have created a ticket [1].

1 - https://issues.apache.org/jira/browse/IGNITE-13120

02.06.2020, 16:48, "ткаленко кирилл" <[hidden email]>:

> Maxim I suggested moving control.sh in a separate module, are we talking about the same thing?
>
> 02.06.2020, 16:15, "Maxim Muzafarov" <[hidden email]>:
>>  Folks,
>>
>>  +1
>>
>>  However, AFAIK control.sh is the part of the ignite-core module with
>>  zero dependencies from external resources.
>>  Would it be better going the `control.sh` extensions-way?
>>
>>  By the way, according to README.md [1] the picocli is already using by
>>  the Apache Ignite, right? :-)
>>
>>>   Picocli is used in the Apache Hadoop Ozone/HDDS command line tools, the Apache Hive benchmark CLI, has ** Apache [Ignite TensorFlow] **, and Apache Sling.
>>
>>  [1] https://github.com/remkop/picocli/blame/master/README.md#L199
>>
>>  On Tue, 2 Jun 2020 at 16:09, Ivan Daschinsky <[hidden email]> wrote:
>>>   +1 But this is not only usability improvement, but also a huge code
>>>   improvement. With picocli developers can add custom command without writing
>>>   a lot of boilerplate and error prone code to do a trivial task
>>>   of parsing CLI arguments. Cleaner code, less bugs also matter.
>>>
>>>   вт, 2 июн. 2020 г. в 16:02, Sergey Antonov <[hidden email]>:
>>>
>>>   > It would be a great usability improvement!
>>>   >
>>>   > +1 From me.
>>>   >
>>>   > вт, 2 июн. 2020 г. в 15:54, Zhenya Stanilovsky <[hidden email]
>>>   > >:
>>>   >
>>>   > >
>>>   > >
>>>   > > good catch ! it`s a little bit pain for now to working with it.
>>>   > >
>>>   > >
>>>   > > >Hi, Igniters!
>>>   > > >
>>>   > > >At the moment to work with the control.sh we need to know exactly what
>>>   > > the name of the command and its options are and so the user can often
>>>   > make
>>>   > > mistakes when using it. So I think it would be useful to do control.sh
>>>   > more
>>>   > > user-friendly by adding autocomplete as in modern command-line utilities.
>>>   > > >
>>>   > > >For this purpose, I suggest using framework [1] and to do this, take out
>>>   > > control.sh together with its associated classes in a separate module such
>>>   > > as "modules/control-utility".
>>>   > > >
>>>   > > >Comments, suggestions?
>>>   > > >
>>>   > > >[1] - https://picocli.info/
>>>   > >
>>>   > >
>>>   > >
>>>   > >
>>>   >
>>>   >
>>>   >
>>>   > --
>>>   > BR, Sergey Antonov
>>>   >
>>>
>>>   --
>>>   Sincerely yours, Ivan Daschinskiy
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Add autocompletion for commands in control.sh

ezhuravl
Hi,

+1 for both moving control.sh to the separate module and adding
autocompletion.

Will API remain the same in control.sh?

Evgenii

пт, 5 июн. 2020 г. в 01:59, ткаленко кирилл <[hidden email]>:

> Folks have created a ticket [1].
>
> 1 - https://issues.apache.org/jira/browse/IGNITE-13120
>
> 02.06.2020, 16:48, "ткаленко кирилл" <[hidden email]>:
> > Maxim I suggested moving control.sh in a separate module, are we talking
> about the same thing?
> >
> > 02.06.2020, 16:15, "Maxim Muzafarov" <[hidden email]>:
> >>  Folks,
> >>
> >>  +1
> >>
> >>  However, AFAIK control.sh is the part of the ignite-core module with
> >>  zero dependencies from external resources.
> >>  Would it be better going the `control.sh` extensions-way?
> >>
> >>  By the way, according to README.md [1] the picocli is already using by
> >>  the Apache Ignite, right? :-)
> >>
> >>>   Picocli is used in the Apache Hadoop Ozone/HDDS command line tools,
> the Apache Hive benchmark CLI, has ** Apache [Ignite TensorFlow] **, and
> Apache Sling.
> >>
> >>  [1] https://github.com/remkop/picocli/blame/master/README.md#L199
> >>
> >>  On Tue, 2 Jun 2020 at 16:09, Ivan Daschinsky <[hidden email]>
> wrote:
> >>>   +1 But this is not only usability improvement, but also a huge code
> >>>   improvement. With picocli developers can add custom command without
> writing
> >>>   a lot of boilerplate and error prone code to do a trivial task
> >>>   of parsing CLI arguments. Cleaner code, less bugs also matter.
> >>>
> >>>   вт, 2 июн. 2020 г. в 16:02, Sergey Antonov <
> [hidden email]>:
> >>>
> >>>   > It would be a great usability improvement!
> >>>   >
> >>>   > +1 From me.
> >>>   >
> >>>   > вт, 2 июн. 2020 г. в 15:54, Zhenya Stanilovsky
> <[hidden email]
> >>>   > >:
> >>>   >
> >>>   > >
> >>>   > >
> >>>   > > good catch ! it`s a little bit pain for now to working with it.
> >>>   > >
> >>>   > >
> >>>   > > >Hi, Igniters!
> >>>   > > >
> >>>   > > >At the moment to work with the control.sh we need to know
> exactly what
> >>>   > > the name of the command and its options are and so the user can
> often
> >>>   > make
> >>>   > > mistakes when using it. So I think it would be useful to do
> control.sh
> >>>   > more
> >>>   > > user-friendly by adding autocomplete as in modern command-line
> utilities.
> >>>   > > >
> >>>   > > >For this purpose, I suggest using framework [1] and to do this,
> take out
> >>>   > > control.sh together with its associated classes in a separate
> module such
> >>>   > > as "modules/control-utility".
> >>>   > > >
> >>>   > > >Comments, suggestions?
> >>>   > > >
> >>>   > > >[1] - https://picocli.info/
> >>>   > >
> >>>   > >
> >>>   > >
> >>>   > >
> >>>   >
> >>>   >
> >>>   >
> >>>   > --
> >>>   > BR, Sergey Antonov
> >>>   >
> >>>
> >>>   --
> >>>   Sincerely yours, Ivan Daschinskiy
>
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Add autocompletion for commands in control.sh

Alexey Goncharuk
Definitely a +1 from me for moving the CLI tooling to a separate module.

As for the autocompletion - can you elaborate how it works? Will it require
to run an additional tool when a user hits TAB? Or will it generate an
autocompletion file during the build? Will we require an install step for
Ignite tools for autocompletion to work then?
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Add autocompletion for commands in control.sh

vveider
Autocompletion is a separate shell module that required installing along with adding separate modules for each system (git, etc.)
It will require used to run script to install it in the system, so I would left it for RPM or DEB packages where that can be managed correctly.


> On 18 Jun 2020, at 18:05, Alexey Goncharuk <[hidden email]> wrote:
>
> Definitely a +1 from me for moving the CLI tooling to a separate module.
>
> As for the autocompletion - can you elaborate how it works? Will it require
> to run an additional tool when a user hits TAB? Or will it generate an
> autocompletion file during the build? Will we require an install step for
> Ignite tools for autocompletion to work then?

Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Add autocompletion for commands in control.sh

Kirill Tkalenko
In reply to this post by ezhuravl
Hi Evgenii!

At first glance, api will not change, but I can see it when I will do it.

17.06.2020, 23:16, "Evgenii Zhuravlev" <[hidden email]>:

> Hi,
>
> +1 for both moving control.sh to the separate module and adding
> autocompletion.
>
> Will API remain the same in control.sh?
>
> Evgenii
>
> пт, 5 июн. 2020 г. в 01:59, ткаленко кирилл <[hidden email]>:
>
>>  Folks have created a ticket [1].
>>
>>  1 - https://issues.apache.org/jira/browse/IGNITE-13120
>>
>>  02.06.2020, 16:48, "ткаленко кирилл" <[hidden email]>:
>>  > Maxim I suggested moving control.sh in a separate module, are we talking
>>  about the same thing?
>>  >
>>  > 02.06.2020, 16:15, "Maxim Muzafarov" <[hidden email]>:
>>  >> Folks,
>>  >>
>>  >> +1
>>  >>
>>  >> However, AFAIK control.sh is the part of the ignite-core module with
>>  >> zero dependencies from external resources.
>>  >> Would it be better going the `control.sh` extensions-way?
>>  >>
>>  >> By the way, according to README.md [1] the picocli is already using by
>>  >> the Apache Ignite, right? :-)
>>  >>
>>  >>> Picocli is used in the Apache Hadoop Ozone/HDDS command line tools,
>>  the Apache Hive benchmark CLI, has ** Apache [Ignite TensorFlow] **, and
>>  Apache Sling.
>>  >>
>>  >> [1] https://github.com/remkop/picocli/blame/master/README.md#L199
>>  >>
>>  >> On Tue, 2 Jun 2020 at 16:09, Ivan Daschinsky <[hidden email]>
>>  wrote:
>>  >>> +1 But this is not only usability improvement, but also a huge code
>>  >>> improvement. With picocli developers can add custom command without
>>  writing
>>  >>> a lot of boilerplate and error prone code to do a trivial task
>>  >>> of parsing CLI arguments. Cleaner code, less bugs also matter.
>>  >>>
>>  >>> вт, 2 июн. 2020 г. в 16:02, Sergey Antonov <
>>  [hidden email]>:
>>  >>>
>>  >>> > It would be a great usability improvement!
>>  >>> >
>>  >>> > +1 From me.
>>  >>> >
>>  >>> > вт, 2 июн. 2020 г. в 15:54, Zhenya Stanilovsky
>>  <[hidden email]
>>  >>> > >:
>>  >>> >
>>  >>> > >
>>  >>> > >
>>  >>> > > good catch ! it`s a little bit pain for now to working with it.
>>  >>> > >
>>  >>> > >
>>  >>> > > >Hi, Igniters!
>>  >>> > > >
>>  >>> > > >At the moment to work with the control.sh we need to know
>>  exactly what
>>  >>> > > the name of the command and its options are and so the user can
>>  often
>>  >>> > make
>>  >>> > > mistakes when using it. So I think it would be useful to do
>>  control.sh
>>  >>> > more
>>  >>> > > user-friendly by adding autocomplete as in modern command-line
>>  utilities.
>>  >>> > > >
>>  >>> > > >For this purpose, I suggest using framework [1] and to do this,
>>  take out
>>  >>> > > control.sh together with its associated classes in a separate
>>  module such
>>  >>> > > as "modules/control-utility".
>>  >>> > > >
>>  >>> > > >Comments, suggestions?
>>  >>> > > >
>>  >>> > > >[1] - https://picocli.info/
>>  >>> > >
>>  >>> > >
>>  >>> > >
>>  >>> > >
>>  >>> >
>>  >>> >
>>  >>> >
>>  >>> > --
>>  >>> > BR, Sergey Antonov
>>  >>> >
>>  >>>
>>  >>> --
>>  >>> Sincerely yours, Ivan Daschinskiy
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Add autocompletion for commands in control.sh

Kirill Tkalenko
In reply to this post by Alexey Goncharuk
Hi Alexey!

I will take a short pause before the implementation and try to answer all your questions.

18.06.2020, 18:05, "Alexey Goncharuk" <[hidden email]>:
> Definitely a +1 from me for moving the CLI tooling to a separate module.
>
> As for the autocompletion - can you elaborate how it works? Will it require
> to run an additional tool when a user hits TAB? Or will it generate an
> autocompletion file during the build? Will we require an install step for
> Ignite tools for autocompletion to work then?