autocomplete icon indicating copy to clipboard operation
autocomplete copied to clipboard

Collision with `fly`

Open mamercad opened this issue 3 years ago • 3 comments

https://github.com/withfig/autocomplete/blob/b2530e5143ee4e67e8f8c09c1feedeac15b99263/src/fly.ts#L4

This is unfortunate; what's the answer when it comes to collisions? For this particular command, it's colliding with this.

mamercad avatar Jun 14 '22 22:06 mamercad

Ah, that's a shame!! This is a particularly hard problem to solve, something even fish hasn't quite got down for the bundled completions. The current way to do this is by running a command and checking its output for something that's only in one of the CLIs, eg. fly --help.

Similar issue with taskwarrior and go-task, there's a PR still open for that if you want to reference the implementation!

Maybe @fedeci has some thoughts on better ways we can do this?

clo4 avatar Jun 22 '22 07:06 clo4

Really tough problem to solve, I see the benefits of using help, and probably that is the best way but I would prefer to see it handled by the engine. For the moment let's generate specs dynamically and maybe cache them?

fedeci avatar Jun 22 '22 13:06 fedeci

Hey @mamercad, yesterday we had a team call to discuss about this edge case and we will start to work on this feature in the next days. I'll inform you when it will be released!

fedeci avatar Aug 18 '22 11:08 fedeci