Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve API to get flag completion function #2063

Merged
merged 1 commit into from
Nov 2, 2023

Commits on Nov 2, 2023

  1. Improve API to get flag completion function

    The new API is simpler and matches the `c.RegisterFlagCompletionFunc()`
    API.  By removing the global function `GetFlagCompletion()` we are more
    future proof if we ever move from a global map of flag completion
    functions to something associated with the command.
    
    The commit also makes this API work with persistent flags by using
    `c.Flag(flagName)` instead of `c.Flags().Lookup(flagName)`.
    
    The commit also adds unit tests.
    
    Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
    marckhouzam committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    74f1665 View commit details
    Browse the repository at this point in the history