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

Remove __complete cmd for programs without subcmds #1563

Merged
merged 1 commit into from Dec 14, 2021

Commits on Dec 14, 2021

  1. Remove __complete cmd for program without subcmds

    Fixes spf13#1562
    
    Programs that don't have sub-commands can accept any number of args.
    However, when doing shell completion for such programs, within the
    __complete code this very __complete command makes it that the program
    suddenly has a sub-command, and the call to Find() -> legacyArgs() will
    then return an error if there are more than one argument on the
    command-line being completed.
    
    To avoid this, we first remove the __complete command in such a case so
    as to get back to having no sub-commands.
    
    Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
    marckhouzam committed Dec 14, 2021
    Copy the full SHA
    c79b2dd View commit details
    Browse the repository at this point in the history