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

Make kubectl bash-completion namespace and resource alias aware #23262

Merged

Conversation

sttts
Copy link
Contributor

@sttts sttts commented Mar 20, 2016

kubectl-completion

  • filter resource listing by --namespace flag given before in the command line
$ kubectl get pod --namespace=kube-system <tab><tab>
kube-dns-v9-2wuzj   kube-dns-v9-llqxa
  • add completion of --namespace
$ kubectl get pod --namespace=<tab><tab>
[*]         default      ingress      kube-system
  • add support for plural nouns and aliases like rc

@k8s-github-robot
Copy link

Labelling this PR as size/L

@k8s-github-robot k8s-github-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 20, 2016
local ret two_word_ns
ret=""
two_word_ns=false
for w in ${words[@]}; do
Copy link
Contributor

Choose a reason for hiding this comment

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

${words[@]} should be in quotes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@k8s-bot
Copy link

k8s-bot commented Mar 20, 2016

GCE e2e build/test passed for commit 98afa1fc96f7dfe78ae48512b8aca5b4f9bcacb2.

@sttts sttts force-pushed the sttts-bash-completion-flag-equal branch 2 times, most recently from 5737184 to b1ea0e3 Compare March 21, 2016 06:59
@k8s-bot
Copy link

k8s-bot commented Mar 21, 2016

GCE e2e build/test passed for commit 5737184fdbfda69e49abb1ee8115855648895d53.

@k8s-bot
Copy link

k8s-bot commented Mar 21, 2016

GCE e2e build/test passed for commit b1ea0e3f4366528938b87da8bad151841b7a5162.

@sttts sttts force-pushed the sttts-bash-completion-flag-equal branch from b1ea0e3 to d065019 Compare March 22, 2016 07:02
@sttts sttts changed the title WIP: Improve shell completion Improve shell completion Mar 22, 2016
@k8s-bot
Copy link

k8s-bot commented Mar 22, 2016

GCE e2e build/test passed for commit d06501945fc9704d8ede8745870289fc97208dd7.

@sttts sttts force-pushed the sttts-bash-completion-flag-equal branch from d065019 to 7272bfd Compare March 22, 2016 08:17
@k8s-bot
Copy link

k8s-bot commented Mar 22, 2016

GCE e2e build/test failed for commit 7272bfdac2c026555671cdba7814397a323c74b4.

Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake.

@sttts sttts force-pushed the sttts-bash-completion-flag-equal branch from 7272bfd to 3c19b65 Compare March 22, 2016 11:45
@k8s-bot
Copy link

k8s-bot commented Mar 22, 2016

GCE e2e build/test failed for commit 3c19b65098a70317aed9e33acd590ea3eaf7fb4d.

Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake.

@sttts sttts force-pushed the sttts-bash-completion-flag-equal branch from 3c19b65 to a43e584 Compare March 22, 2016 12:06
@k8s-bot
Copy link

k8s-bot commented Mar 22, 2016

GCE e2e build/test passed for commit a43e58484f9b82f76a2c67ea853f8c53c0792523.

@sttts sttts force-pushed the sttts-bash-completion-flag-equal branch from a43e584 to fb3ca8d Compare March 22, 2016 12:46
@k8s-bot
Copy link

k8s-bot commented Mar 22, 2016

GCE e2e build/test passed for commit fb3ca8d9f5426389975870a233a04aa869e71aa8.

@@ -135,6 +166,8 @@ __handle_noun()

if __contains_word "${words[c]}" "${must_have_one_noun[@]}"; then
must_have_one_noun=()
elif __contains_word "${words[c]%!s(MISSING)}" "${must_have_one_noun[@]}"; then
Copy link
Contributor

Choose a reason for hiding this comment

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

%!s(MISSING) ? looks like some bad golang somewhere...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sttts sttts force-pushed the sttts-bash-completion-flag-equal branch from fb3ca8d to c9a749c Compare March 22, 2016 17:55
@k8s-bot
Copy link

k8s-bot commented Mar 22, 2016

GCE e2e build/test passed for commit c9a749c08f3027380cd279e3cfe477a7938a85d6.

@sttts sttts force-pushed the sttts-bash-completion-flag-equal branch from c9a749c to 6c36665 Compare March 22, 2016 18:40
@sttts
Copy link
Contributor Author

sttts commented Mar 22, 2016

hack/update-godep-licenses.sh doesn't like me.

@k8s-bot
Copy link

k8s-bot commented Mar 22, 2016

GCE e2e build/test passed for commit 6c36665e1b988186644adf055462efa7dcc75dfc.

@sttts
Copy link
Contributor Author

sttts commented Mar 22, 2016

bash4'ism in that script.

@sttts sttts force-pushed the sttts-bash-completion-flag-equal branch from 6c36665 to 4ca3684 Compare March 22, 2016 19:29
@k8s-bot
Copy link

k8s-bot commented Mar 22, 2016

GCE e2e build/test passed for commit 4ca36845ca68d265d0b721af00afdf030eeff914.

@k8s-bot
Copy link

k8s-bot commented Apr 3, 2016

GCE e2e build/test passed for commit 34ccd3ce56639863d07bed9d3b06f8be589a3da5.

- add namespace filtering to bash completion
- add --namespace flag bash completion
- add bash completion noun aliases
- adapt to new cobra package structure
@sttts sttts force-pushed the sttts-bash-completion-flag-equal branch from 34ccd3c to f832aaf Compare April 3, 2016 14:26
@sttts sttts changed the title WIP: Improve shell completion Make kubectl bash-completion namespace aware and add resource aliases Apr 3, 2016
@sttts sttts added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Apr 3, 2016
@sttts
Copy link
Contributor Author

sttts commented Apr 3, 2016

Updated to latest cobra master with shellcheck fixes.

@k8s-bot
Copy link

k8s-bot commented Apr 3, 2016

GCE e2e build/test passed for commit f832aaf.

@sttts sttts changed the title Make kubectl bash-completion namespace aware and add resource aliases Make kubectl bash-completion namespace and resource alias aware Apr 3, 2016
@eparis eparis added lgtm "Looks good to me", indicates that a PR is ready to be merged. e2e-not-required release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. e2e-not-required labels Apr 3, 2016
@sttts sttts mentioned this pull request Apr 3, 2016
@k8s-github-robot
Copy link

@k8s-bot test this

Tests are more than 48 hours old. Re-running tests.

@k8s-bot
Copy link

k8s-bot commented Apr 5, 2016

GCE e2e build/test passed for commit f832aaf.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Apr 5, 2016

GCE e2e build/test failed for commit f832aaf.

Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake.

@sttts
Copy link
Contributor Author

sttts commented Apr 12, 2016

@k8s-bot test this please flake: #21367

@k8s-bot
Copy link

k8s-bot commented Apr 12, 2016

GCE e2e build/test passed for commit f832aaf.

@k8s-github-robot
Copy link

@k8s-bot test this

Tests are more than 48 hours old. Re-running tests.

@k8s-bot
Copy link

k8s-bot commented Apr 14, 2016

GCE e2e build/test passed for commit f832aaf.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Apr 14, 2016

GCE e2e build/test passed for commit f832aaf.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit e121b56 into kubernetes:master Apr 14, 2016
openshift-publish-robot pushed a commit to openshift/kubernetes that referenced this pull request Jun 25, 2019
…ete-loop-fix

Bug 1712528 - oc delete of a static pod results in multiple attempts to re-create the mirror pod before succeeding

Origin-commit: e4b9b95d5b5eb0108efa67619b42c7b3f1609074
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants