Open danielshahaf opened 8 years ago
A combination of these. We can't predict all possible predicates. Some are obvious like conditional on the OS type. I'd prefer to avoid dynamically generating grammars in favour of simpler options that list values one per-line. e.g rsync --list=disabled-options. That's more flexible and easier to parse and use for other things.
Are there commands for which static grammars would be insufficient? For example, commands whose acceptable syntaxes depend on time of day, configuration files, disk contents, phase of the moon...?
Strategies for dealing with these:
validity-predicate: "only on Tuesdays"
.rsync --parseable-help
switch that emits a grammar on stdout. Then it's rsync's problem to check whether today is a Tuesday.