Some kind of generic data structure that would be relatively easy to write AND parse, like YAML or ConfigFile-ish.
name: mycmd
shortops
a: [short name, description]
h: [help, display help text]
v: [version, display version text]
longopts
help: [help, display help text]
version: [version, display version text]
Then when mycmd -<TAB>
is entered, the short ops are displayed (ideally
tabulated into a readable layout first), and so on.
I'm guessing the reason nothing like this exists is because shell creators have different ideas of how a completion file's syntax should be. But I wish something like this DID exist because writing even simple zsh comp files is a nightmare. I think the manpage is like 10,000 or so lines.