News for hackers. Stuff that matters.
Re:OpenAutoComplete: Shell-agnostic, cross-platform autocomp... by TeddyDD on Thursday May 21, 2020 @02:55AM (#23255566)
Fish does something like this (it scans manpages) but generated completion is mostly useless in more complex cli programs (for example: kubectl, docker). So fish is shipped with a bunch of manually written completions for many commands.
Re:OpenAutoComplete: Shell-agnostic, cross-platform autocomp... by Mizza on Thursday May 21, 2020 @03:05AM (#23255609)
Docker looks like it would be totally doable to me. On every page, all the options are in a standardly structured "Options:" section, all commands are in a standardly structured "Commands" section, and --help and the Options: parser will also work on the subcommands.

It won't have typing, but it'd work. Do the most common argument parsing libraries from the standard libraries of the most popular languages and you're mostly there.

As a maintainer, I'm sick of having to include all sorts of different stupid autocompleters and think that it should be the job of an intelligent shell.

Re:OpenAutoComplete: Shell-agnostic, cross-platform autocomp... by dastx on Thursday May 21, 2020 @03:21AM (#23255689)
For things like docker simply parsing the help isn't enough. Docker's environment can get pretty complex, pretty quick. There are a thousand different arguments that require different kinds of inputs (think ports, mounts, images id, container I'd and much more). You cannot figure out what the argument type is from just the help or manpages. This is the case for many, many applications.