Skip to content

No way to hint option values for completion #2

@rtweeks

Description

@rtweeks

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions