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

Fix:(issue_1916) Add additional check for -- #1919

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dearchap
Copy link
Contributor

@dearchap dearchap commented Jun 2, 2024

What type of PR is this?

(REQUIRED)

  • bug

What this PR does / why we need it:

(REQUIRED)

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #1916

Special notes for your reviewer:

(fill-in or delete this section)

Testing

(fill-in or delete this section)

Release Notes

(REQUIRED)


@dearchap dearchap marked this pull request as ready for review June 28, 2024 13:58
@dearchap dearchap requested a review from a team as a code owner June 28, 2024 13:58
@@ -237,6 +237,11 @@ func DefaultCompleteWithFlags(ctx context.Context, cmd *Command) {
lastArg = args[argsLen-1]
}

if len(cmd.runArgs) > 1 && cmd.runArgs[len(cmd.runArgs)-1] == "-" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like an equality check for "-" but then lastArg is later checked for a prefix of "-". Is that right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should I expect completion of nested command's flags to work?
2 participants