cli auto-complete for atomicapp
atomicapp is missing auto-complete of commands, this would be nice feature to have.
+1 for bash completion. @surajssd if you want, we can work on this together.
@containscafeine I feel this can be a beginner friendly issue which new people who wanna contribute can work on.
@surajssd this could be an interesting thing to have, but if we mainly run from an embedded container then we might not ever see the benefits of something like this
Hi, I'm beginner to atomic project and wanna work on this issue, please guide me further.
@shiminsh How docker-machine does their bash autocompletion could possibly help: https://github.com/docker/machine/blob/master/contrib/completion/bash/docker-machine.bash
Hi, I was just browsing through the issue and gave it a shot here is the poc https://asciinema.org/a/3ygvn2uxnstvgsn3h02e4kng2 and the code which I wrote for it https://github.com/abhi1004/atomicapp_cli_completion Could you please review if it is the step in the right direction. @shiminsh were you thinking in the same direction ? @dustymabe @cdrage any suggestions ?
Regards, Abhishek
@abhi1004 this looks pretty awesome! I am fairly new to bash completion development. do you know if it is possible to autogenerate the competion file https://github.com/abhi1004/atomicapp_cli_completion ?
@dustymabe thanks for the review, I'll try to figure it out if it is possible to autogenerate the completion file.
@abhi1004 Yeah, mine is also in same direction but you should have talked here before working on any issue, as I'm working on same.
@abhi1004 that'd be awesome :) even if it's a bash script that will auto generate from atomicapp's output that'd be great.
I've been trying to google for a solution but none so far, if it's too hard then there's no worries, even large projects still have to update their autocompletion manually since there's not a solution to autogenerating it.
@abhi1004 Yeah, mine is also in same direction but you should have talked here before working on any issue, as I'm working on same.
@shiminsh I agree. @abhi1004 @shiminsh I would like to thank you both for your interests. Do you mind working on this together?
Also feel free to try to pick up other issues that look like low hanging fruit and thanks again!
@shiminsh I apologize that I have created a short poc for it, we can work on this together if you agree and please accept my apologies. @dustymabe thanks and yes I'll work on some other issue as well. @cdrage thank you for the review and I'll try if I can help to fix the issue.
@abhi1004 and @shiminsh, Thanks for your PRs - did either of you ever investigate if there is a good way to autogenerate the bash completion files so that we don't have to maintain it seperately from the code?
@dustymabe I searched a lot about it, but no luck.
@dustymabe @shiminsh @abhi1004 I have found a Python library which auto-generates this, but I don't know how much of work this is? http://docs.openstack.org/developer/cliff/complete.html
Complete documentation of the cliff http://docs.openstack.org/developer/cliff/
Okay, lets try this.