Skip to content

Use selected project for autocompleting resources#334

Closed
rnestler wants to merge 3 commits intoninech:mainfrom
rnestler:use-selected-project-for-autocompleting-resources
Closed

Use selected project for autocompleting resources#334
rnestler wants to merge 3 commits intoninech:mainfrom
rnestler:use-selected-project-for-autocompleting-resources

Conversation

@rnestler
Copy link
Copy Markdown
Contributor

Fixes #333

@rnestler rnestler force-pushed the use-selected-project-for-autocompleting-resources branch from 9ce6feb to bc7e401 Compare January 23, 2026 13:41

func findProject() string {
// try to find it in the full command line.
if line := os.Getenv("COMP_LINE"); line != "" {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a bit ugly, but the issue is that the complete.Args only include the arguments of the current subcommand, and --project is a global flag.

Otherwise it will break project auto-completion.
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.

App autocompletion dosn't respect the --project flag

1 participant