-
Couldn't load subscription status.
- Fork 1.6k
✨ feat: add autocomplete for development #5144
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
base: master
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: gjrtimmer The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Hi @gjrtimmer. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
docs/book/src/getting-started/testdata/project/.devcontainer/post-install.sh
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds bash autocompletion support for development tools (kind, kubebuilder, kubectl, and docker) to improve developer experience in devcontainer environments.
Key Changes:
- Added autocompletion setup scripts for kind, kubebuilder, kubectl, and docker after their respective installations
- Implemented idempotent marker-based checks to prevent duplicate autocompletion entries
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| testdata/project-v4/.devcontainer/post-install.sh | Added autocompletion configuration for all four tools in v4 project template |
| testdata/project-v4-with-plugins/.devcontainer/post-install.sh | Added autocompletion configuration for all four tools in v4-with-plugins template |
| testdata/project-v4-multigroup/.devcontainer/post-install.sh | Added autocompletion configuration for all four tools in v4-multigroup template |
| pkg/plugins/golang/v4/scaffolds/internal/templates/devcontainer.go | Updated devcontainer template to generate autocompletion setup code |
| docs/book/src/multiversion-tutorial/testdata/project/.devcontainer/post-install.sh | Added autocompletion configuration for multiversion tutorial |
| docs/book/src/getting-started/testdata/project/.devcontainer/post-install.sh | Added autocompletion configuration for getting-started tutorial |
| docs/book/src/cronjob-tutorial/testdata/project/.devcontainer/post-install.sh | Added autocompletion configuration for cronjob tutorial |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #!/bin/bash | ||
| set -x | ||
|
|
||
| BASHRC_FILE="$HOME/.bashrc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How we will know that?
Are all envs using bashrc?
I do not think so
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, they do, for the simple fact that this is part of the devcontainer post-install. And the devcontainer is set to bash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @gjrtimmer
Thank you a lot for your contribution 🥇
But we can only add to the default scaffold if we can ensure that the changes will work well in all environments.
In this case, I do not see how we could ensure and be able to know what the profile file for any env and so. I think that will be an issue to allow us to move forward within.
This involves the Please clarify your line of reasoning regarding this change and how it applies to the devcontainer development environment, as the devcontainer environment is fixed to ensure an easy, consistent development environment for all developers. |
Motivation
I was missing autocomplete during development, so I added it to make my life easier.
Description
This PR will update the
.devcontainer/post-install.shscript to install bash autocomplete for the various development tools. This will make development easier, faster, and more convenient for the developers.Bash autocomplete is already part of the golang:1.25 image.
Impact
None
Affected Tools