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

[RFC] Redirect bash completion v1 to v2 when possible #1867

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Nov 25, 2022

  1. Redirect bash completion v1 to v2 when possible

    We are no longer actively maintaining bash completion v1 in favor of its
    more rich v2 version.  Previously, using bash completion v2 required
    projects to be aware of its existence and to explicitly call
    GenBashCompletionV2().
    
    With this commit, any projects calling GenBashCompletion() will
    automatically be redirected to using the v2 version.
    
    One exception is if the project uses the legacy custom completion logic
    which is not supported in v2.  We can detect that by looking for the
    use of the field `BashCompletionFunction` on the root command.
    
    Note that descriptions are kept off when calling GenBashCompletion().
    This means that to enable completion descriptions for bash, a project
    must still explicitly call GenBashCompletionV2().
    
    Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
    marckhouzam committed Nov 25, 2022
    Configuration menu
    Copy the full SHA
    5a79329 View commit details
    Browse the repository at this point in the history