OpenAutoComplete: Shell-agnostic, cross-platform autocomplete specification
1–10 of 27 posts
Re: OpenAutoComplete: Shell-agnostic, cross-platform autocomplete specification
#2I have tried writing auto-complete scripts for various tools several times. I'm quite good with bash (if I may say so myself). I've written some fairly advanced scripts and have been doing it a long time. However, despite my existing experience, writing auto completion is still a major pain in the ass. This is an area that really needs improvement.
I don't know if this project is the correct answer. I think some good discussion should be had. But I do want to say that the problem they are solving is real.
Re: OpenAutoComplete: Shell-agnostic, cross-platform autocomplete specification
#3Re: OpenAutoComplete: Shell-agnostic, cross-platform autocomplete specification
#4If we could get some standards defined and adopted, that would be amazing. There are so many CLI tools that could really benefit from auto-complete, but don't yet have it because it is a huge pain to write. Often times the auto-complete is significantly more work than the original tool was, in a couple cases I've written it was an order of magnitude more work to write the shell completion. I have tried writing auto-c…
So, I've tried to make the spec as generic as possible, so it could support current compicated cases, like git (with its infinite number of commands and options), scp (with its remote file listing), some old Windows commands (like "format" for windows95 and so on).
Also, this format could be used with a single-pass recursive generator, because each usage pattern is just a JSON array and all its properties can be defined in-place. So, it would be okay to use it with languages, like C, that have no JSON serializer built-in.
Re: OpenAutoComplete: Shell-agnostic, cross-platform autocomplete specification
#5wish there was more autocomplete in powershell
Re: OpenAutoComplete: Shell-agnostic, cross-platform autocomplete specification
#6https://github.com/oilshell/oil/wiki/Shellac-Protocol-Propos...
but cut it out of the Oil project (for the forseeable future). Right now Oil takes the approach of running existing bash completion scripts, which solves the problem well enough (but leaves a few things to be desired)
If someone comes up with a spec that works in at least one other shell, and some code, I'll be happy to merge it into Oil.
Though, reading over this, it looks pretty early, and I don't think the "spec first" approach really works. That is, the spec should be derived from working code, and I believe you have to implement it in more than one shell to tell if it's feasible.
Some other links I collected:
Re: OpenAutoComplete: Shell-agnostic, cross-platform autocomplete specification
#7Re: OpenAutoComplete: Shell-agnostic, cross-platform autocomplete specification
#8I started down this path last year: https://github.com/oilshell/oil/wiki/Shellac-Protocol-Propos... but cut it out of the Oil project (for the forseeable future). Right now Oil takes the approach of running existing bash completion scripts, which solves the problem well enough (but leaves a few things to be desired) If someone comes up with a spec that works in at least one other shell, and some code, I'll be happy t…
Re: OpenAutoComplete: Shell-agnostic, cross-platform autocomplete specification
#9Can't you just parse --help in the background so we as developers don't need to write anything at all?
Re: OpenAutoComplete: Shell-agnostic, cross-platform autocomplete specification
#10I started down this path last year: https://github.com/oilshell/oil/wiki/Shellac-Protocol-Propos... but cut it out of the Oil project (for the forseeable future). Right now Oil takes the approach of running existing bash completion scripts, which solves the problem well enough (but leaves a few things to be desired) If someone comes up with a spec that works in at least one other shell, and some code, I'll be happy t…
Thanks for the reply! I've googled hard, but couldn't find anything like that. The problem I see is that Shellac is dynamic. So, it is pretty intrusive. This is how Click autocompletion works in Python. Also, I don't think, that Shellac is mutually exclusive with OpenAutoComplete. Being a Shell-to-autocompletion server protocol, it could use openautocomplete library as a data source.