-
Notifications
You must be signed in to change notification settings - Fork 1
Description
I'd like to be able to add a --branch option for a command that, when completion is triggered, consults the relevant Git repository and lists the branches matching that pattern. This gem probably shouldn't integrate so tightly with Git, but at least offer a way for the missing option argument to trigger some code in my program to produce the options, and I can go query the appropriate Git repo (or generate suggested option values in other ways).
It would also be nice if enumerating values in OptionParser#on had them show up in completion, but that confines the user to the listed value and isn't good for my use case because I don't want to A) limit my user (they might want to use a commit hash or tag name), or B) run git to generate the list for every completion when setting up the OptionParser.