You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not an immediate concern but I am creating an issue for discussion and to collect currently existing approaches and maybe for someone to take a stab at it.
Parsing manual pages is a messy business since there is no single standard and there are many slight variations.
Other project is explainshell but it does not handle command grammars so it is not a suitable approach (it could generate invalid suggestions).
What I imagine:
If completion definitions for a command are not available then try to parse man command or command --help or command -h
There are many variations so using a high-level parsing library like Instaparse is preferred. We can define different variant of parsing rules and reuse the common rules.
Docopt seems to be most formal description of command line arguments, so it makes sense to start with parsing its format, then extend to other manual pages in the wild.
The text was updated successfully, but these errors were encountered:
Compleat looks neat, but it does not have a repository of completions so I don't see much value in integrating it.
I once played with using spec to parse argument for a CLI app and I think its doable. Once you have a spec it should be possible to write a completion generator for it. It's a kind of a long shot though.
This is not an immediate concern but I am creating an issue for discussion and to collect currently existing approaches and maybe for someone to take a stab at it.
Parsing manual pages is a messy business since there is no single standard and there are many slight variations.
Existing approaches:
What I imagine:
man command
orcommand --help
orcommand -h
The text was updated successfully, but these errors were encountered: