gocomplete: update version completion - #160
Conversation
| Flags: map[string]complete.Predictor{ | ||
| "m": predict.Nothing, | ||
| "v": predict.Nothing, | ||
| "json": predict.Nothing, | ||
| }, | ||
| Args: predict.Files(""), |
There was a problem hiding this comment.
I'm new to this library and gocomplete, noticed gocomplete is quite outdated, and thought I'd see if/how it could be improved. Thought I'd smart small, here goes update for version.
It has a problem though: if one gives any of the supported flags, then the positional file arguments are no longer offered. If I use predict.Files("") for the Flags map values, then the lib offers files after a flag, but understandably as if they were arguments to the flag -- no other flags are offered.
This is not a unique problem with this addition, several existing commands with Flags having predict.Nothing values have the same problem.
Is this something that could be done some other way to avoid the problem, or is it a limitation of the library? I.e. can I somehow say "this is a flag that takes no arguments" without it affecting other flags or positional arguments?
No description provided.