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

Add default completion command even if there are no other sub-commands #1559

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

Commits on Jun 21, 2023

  1. Remove the default "completion" cmd if it is alone

    When a program has no sub-commands, its root command can accept
    arguments.  If we add the default "completion" command to such programs
    they will now have a sub-command and will no longer accept arguments.
    
    What we do instead for this special case, is only add the "completion"
    command if it is being called, or if it is being completed itself.
    
    We want to have the "completion" command for such programs because it
    will allow the completion of flags and of arguments (if provided
    by the program).
    
    Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
    marckhouzam committed Jun 21, 2023
    Copy the full SHA
    b1acb50 View commit details
    Browse the repository at this point in the history