Skip to content

Conversation

@thde
Copy link
Member

@thde thde commented Jan 29, 2026

Fixes shell completion not finding resources when using --project flag and updateds kong-completion to v0.0.11.

When completing positional arguments in nested subcommands, the posener/complete library slices args.All as it descends through subcommands, making the --project flag unavailable to the predictor.

I also added tests using complete.New() to verify the actual completion behavior.

Manual Test

COMP_LINE="nctl exec --project ninetest application " go run .

Copy link
Contributor

@thirdeyenick thirdeyenick left a comment

Choose a reason for hiding this comment

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

Thanks! Looking good. Just a question: is the COMP_LINE env variable a shell specific thing or is this the same for any shell?

@thde
Copy link
Member Author

thde commented Jan 29, 2026

Thanks! Looking good. Just a question: is the COMP_LINE env variable a shell specific thing or is this the same for any shell?

It's a package specific one. So it works the same for all shells.

@thirdeyenick
Copy link
Contributor

Thanks! Looking good. Just a question: is the COMP_LINE env variable a shell specific thing or is this the same for any shell?

It's a package specific one. So it works the same for all shells.

Thx!

@thde
Copy link
Member Author

thde commented Jan 29, 2026

Well that wasn't really correct. It's standard for Bash, but the library configures it as well for fish and uses bash completion for zsh.

@thde thde merged commit fcf5324 into main Jan 29, 2026
3 checks passed
@thde thde deleted the thde/predictor branch January 29, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants