Skip to content

v2: Dynamic completion for "helm repo" and "helm plugin" - #6265

Merged
hickeyma merged 4 commits into
helm:masterfrom
VilledeMontreal:feat/dynCompRepoRemove
Sep 3, 2019
Merged

hickeyma merged 4 commits into
helm:masterfrom
VilledeMontreal:feat/dynCompRepoRemove

Conversation

@marckhouzam

Copy link
Copy Markdown
Member

What this PR does / why we need it:

This PR adds dynamic shell completion for the commands:

  • helm repo remove <TAB> (which will select from the names of configured repos)
  • helm repo update <TAB> (which will select from the names of configured repos)
  • helm plugin remove <TAB> (which will select from the names of installed plugins)
  • helm plugin update <TAB> (which will select from the names of installed plugins)

helm repo remove <TAB> (will select from the names of configured repos)
helm plugin remove <TAB> (will select from names of installed plugins)
helm plugin update <TAB> (will select from names of installed plugins)

Signed-off-by: Marc Khouzam <[email protected]>
@helm-bot helm-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 22, 2019
@marckhouzam
marckhouzam force-pushed the feat/dynCompRepoRemove branch from c664411 to 4ed7186 Compare August 22, 2019 02:20
@marckhouzam
marckhouzam force-pushed the feat/dynCompRepoRemove branch from 4ed7186 to 0cf3351 Compare August 22, 2019 14:21
@marckhouzam

Copy link
Copy Markdown
Member Author

@hickeyma @jdolitsky This PR for helm v2 is very similar to #6263 which was just merged. The difference is that for v2:

  1. The --home flag can be used, which affects the completion
  2. The command helm repo update takes a repo name as a param, so also requires completion

@marckhouzam

marckhouzam commented Sep 3, 2019 •

Copy link
Copy Markdown
Member Author

@hickeyma To facilitate approval of improvements such as this one, we can now run the acceptance completion tests with Helm v2 (helm/acceptance-testing#30).

Therefore, if you run the completion tests with the current master you will see failures; then if you run them with this PR applied, they should all pass. To run them from master:

cd $GOPATH/src/k8s.io/helm
make && make build-cross
cd $GOPATH/src/helm.sh/acceptance-testing
ROBOT_HELM_PATH=$GOPATH/src/k8s.io/helm/bin ROBOT_RUN_TESTS=shells.robot make

I hope this can provide confidence that the proposed completion changes are safe.

@hickeyma hickeyma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks @marckhouzam

@hickeyma
hickeyma merged commit 3ed073b into helm:master Sep 3, 2019
@marckhouzam
marckhouzam deleted the feat/dynCompRepoRemove branch September 3, 2019 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants