First go here: https://github.com/fitzgen/gcli/commit/b126929139116c3ddfb67910947b008b2614cb97
Not sure exactly what is meant by "strict extension", so feedback on that part of the patch would be appreciated (see https://github.com/fitzgen/gcli/commit/b126929139116c3ddfb67910947b008b2614cb97#L0R399).
Also, on the web version, there is a little bit of extra space between the completion and the stuff typed so far; on the embedded version, there is a little bit of space missing. Not sure where this issue is coming from; we have a ton of spans that maybe aren't needed and are getting in the way?
I've not read the code yet, but to explain what I meant by strict extension:
> ls *<TAB>
> ls bin etc lib usr
In this case the completion is not an extension because pressing tab deletes character from the command line.
There was some discussion the other day about using soundex for extensions, which could come into play as well.
Ok, in that case, my implementation should be correct. I test if something is a strict completion by seeing if the stuff that is currently typed is the start of the completion: https://github.com/fitzgen/gcli/commit/b126929139116c3ddfb67910947b008b2614cb97#L0R399
(Or at least it will soon, I'm going to s/> -1/== 0/).
Fixed above issue: https://github.com/fitzgen/gcli/commit/a04eb52adad9c02b88c94897009d6b899f3f0d64