-
Notifications
You must be signed in to change notification settings - Fork 867
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
shell completion: kubectl-argo-rollouts get rollout TAB
does not auto completes the rollout names
#2015
Labels
Milestone
Comments
I will take this |
thomas-riccardi
added a commit
to thomas-riccardi/argo-rollouts
that referenced
this issue
Oct 27, 2022
…ut [TAB]' works toward argoproj#2015 use ValidArgsFunction from cobra to list candidates for completion: https://github.com/spf13/cobra/blob/main/shell_completions.md#dynamic-completion-of-nouns - filtering on 'toComplete' doesn't seem necessary, at least on bash (most probably bash-completion handles that itself), not sure for the others; I could not find cobra documentation about that use v2 of GenBashCompletion from cobra: https://github.com/spf13/cobra/blob/main/shell_completions.md#bash-completion-v2 - I chose to disable descriptions for completion (as a bash user I'm not used to that), but it's enabled for fish it seems, we can enable it if desired, I have no strong opinion on it
6 tasks
I've started working on it in #2379, with several questions there |
thomas-riccardi
added a commit
to thomas-riccardi/argo-rollouts
that referenced
this issue
Oct 27, 2022
…ut [TAB]' works toward argoproj#2015 use ValidArgsFunction from cobra to list candidates for completion: https://github.com/spf13/cobra/blob/main/shell_completions.md#dynamic-completion-of-nouns use v2 of GenBashCompletion from cobra: https://github.com/spf13/cobra/blob/main/shell_completions.md#bash-completion-v2 - I chose to disable descriptions for completion (as a bash user I'm not used to that), but it's enabled for fish it seems, we can enable it if desired, I have no strong opinion on it
thomas-riccardi
added a commit
to thomas-riccardi/argo-rollouts
that referenced
this issue
Oct 27, 2022
…TAB]' works toward argoproj#2015 use ValidArgsFunction from cobra to list candidates for completion: https://github.com/spf13/cobra/blob/main/shell_completions.md#dynamic-completion-of-nouns use v2 of GenBashCompletion from cobra: https://github.com/spf13/cobra/blob/main/shell_completions.md#bash-completion-v2 - I chose to disable descriptions for completion (as a bash user I'm not used to that), but it's enabled for fish it seems, we can enable it if desired, I have no strong opinion on it
thomas-riccardi
added a commit
to thomas-riccardi/argo-rollouts
that referenced
this issue
Oct 27, 2022
…TAB]' works toward argoproj#2015 use ValidArgsFunction from cobra to list candidates for completion: https://github.com/spf13/cobra/blob/main/shell_completions.md#dynamic-completion-of-nouns use v2 of GenBashCompletion from cobra: https://github.com/spf13/cobra/blob/main/shell_completions.md#bash-completion-v2 - I chose to disable descriptions for completion (as a bash user I'm not used to that), but it's enabled for fish it seems, we can enable it if desired, I have no strong opinion on it Signed-off-by: Thomas Riccardi <[email protected]>
thomas-riccardi
added a commit
to thomas-riccardi/argo-rollouts
that referenced
this issue
Oct 31, 2022
…TAB]' works toward argoproj#2015 use ValidArgsFunction from cobra to list candidates for completion: https://github.com/spf13/cobra/blob/main/shell_completions.md#dynamic-completion-of-nouns use v2 of GenBashCompletion from cobra: https://github.com/spf13/cobra/blob/main/shell_completions.md#bash-completion-v2 - I chose to disable descriptions for completion (as a bash user I'm not used to that), but it's enabled for fish it seems, we can enable it if desired, I have no strong opinion on it Signed-off-by: Thomas Riccardi <[email protected]>
zachaller
pushed a commit
that referenced
this issue
Nov 8, 2022
…s, experiments, analysisrun) (#2379) * PoC dynamic shell completion for 'kubectl-argo-rollouts get rollout [TAB]' works toward #2015 use ValidArgsFunction from cobra to list candidates for completion: https://github.com/spf13/cobra/blob/main/shell_completions.md#dynamic-completion-of-nouns use v2 of GenBashCompletion from cobra: https://github.com/spf13/cobra/blob/main/shell_completions.md#bash-completion-v2 - I chose to disable descriptions for completion (as a bash user I'm not used to that), but it's enabled for fish it seems, we can enable it if desired, I have no strong opinion on it Signed-off-by: Thomas Riccardi <[email protected]> * Factorize resource names completion functions in new util/completion Signed-off-by: Thomas Riccardi <[email protected]> * Add dynamic auto-completion to all ROLLOUT_NAME locations in CLI ...accoding to the Cobra auto-generated CLI documentation. Signed-off-by: Thomas Riccardi <[email protected]> * Add dynamic auto-completion to all EXPERIMENT_NAME locations in CLI ...accoding to the Cobra auto-generated CLI documentation. Signed-off-by: Thomas Riccardi <[email protected]> * Add dynamic auto-completion to all ANALYSISRUN_NAME locations in CLI ...accoding to the Cobra auto-generated CLI documentation. Signed-off-by: Thomas Riccardi <[email protected]> * WIP unit-test dynamic completion Signed-off-by: Thomas Riccardi <[email protected]> * Add unit-tests for new completion package - inspired from kubectl own completion package tests - fake cmd to avoid circular import - reuse info/testdata but we could build our own data for more isolated tests if needed - test all 3 types (Rollout, Experiment, AnalysisRun) - test both first argument completion and second argument Signed-off-by: Thomas Riccardi <[email protected]> * Revert "WIP unit-test dynamic completion" Like in kubectl own completion tests, we now have an independent 'completion' package with its own tests. Stop testing in cmd/ callers packages. This reverts commit 75eb5ae. Signed-off-by: Thomas Riccardi <[email protected]> Signed-off-by: Thomas Riccardi <[email protected]>
jandersen-plaid
pushed a commit
to jandersen-plaid/argo-rollouts
that referenced
this issue
Nov 8, 2022
…s, experiments, analysisrun) (argoproj#2379) * PoC dynamic shell completion for 'kubectl-argo-rollouts get rollout [TAB]' works toward argoproj#2015 use ValidArgsFunction from cobra to list candidates for completion: https://github.com/spf13/cobra/blob/main/shell_completions.md#dynamic-completion-of-nouns use v2 of GenBashCompletion from cobra: https://github.com/spf13/cobra/blob/main/shell_completions.md#bash-completion-v2 - I chose to disable descriptions for completion (as a bash user I'm not used to that), but it's enabled for fish it seems, we can enable it if desired, I have no strong opinion on it Signed-off-by: Thomas Riccardi <[email protected]> * Factorize resource names completion functions in new util/completion Signed-off-by: Thomas Riccardi <[email protected]> * Add dynamic auto-completion to all ROLLOUT_NAME locations in CLI ...accoding to the Cobra auto-generated CLI documentation. Signed-off-by: Thomas Riccardi <[email protected]> * Add dynamic auto-completion to all EXPERIMENT_NAME locations in CLI ...accoding to the Cobra auto-generated CLI documentation. Signed-off-by: Thomas Riccardi <[email protected]> * Add dynamic auto-completion to all ANALYSISRUN_NAME locations in CLI ...accoding to the Cobra auto-generated CLI documentation. Signed-off-by: Thomas Riccardi <[email protected]> * WIP unit-test dynamic completion Signed-off-by: Thomas Riccardi <[email protected]> * Add unit-tests for new completion package - inspired from kubectl own completion package tests - fake cmd to avoid circular import - reuse info/testdata but we could build our own data for more isolated tests if needed - test all 3 types (Rollout, Experiment, AnalysisRun) - test both first argument completion and second argument Signed-off-by: Thomas Riccardi <[email protected]> * Revert "WIP unit-test dynamic completion" Like in kubectl own completion tests, we now have an independent 'completion' package with its own tests. Stop testing in cmd/ callers packages. This reverts commit 75eb5ae. Signed-off-by: Thomas Riccardi <[email protected]> Signed-off-by: Thomas Riccardi <[email protected]>
jandersen-plaid
pushed a commit
to jandersen-plaid/argo-rollouts
that referenced
this issue
Nov 26, 2022
…s, experiments, analysisrun) (argoproj#2379) * PoC dynamic shell completion for 'kubectl-argo-rollouts get rollout [TAB]' works toward argoproj#2015 use ValidArgsFunction from cobra to list candidates for completion: https://github.com/spf13/cobra/blob/main/shell_completions.md#dynamic-completion-of-nouns use v2 of GenBashCompletion from cobra: https://github.com/spf13/cobra/blob/main/shell_completions.md#bash-completion-v2 - I chose to disable descriptions for completion (as a bash user I'm not used to that), but it's enabled for fish it seems, we can enable it if desired, I have no strong opinion on it Signed-off-by: Thomas Riccardi <[email protected]> * Factorize resource names completion functions in new util/completion Signed-off-by: Thomas Riccardi <[email protected]> * Add dynamic auto-completion to all ROLLOUT_NAME locations in CLI ...accoding to the Cobra auto-generated CLI documentation. Signed-off-by: Thomas Riccardi <[email protected]> * Add dynamic auto-completion to all EXPERIMENT_NAME locations in CLI ...accoding to the Cobra auto-generated CLI documentation. Signed-off-by: Thomas Riccardi <[email protected]> * Add dynamic auto-completion to all ANALYSISRUN_NAME locations in CLI ...accoding to the Cobra auto-generated CLI documentation. Signed-off-by: Thomas Riccardi <[email protected]> * WIP unit-test dynamic completion Signed-off-by: Thomas Riccardi <[email protected]> * Add unit-tests for new completion package - inspired from kubectl own completion package tests - fake cmd to avoid circular import - reuse info/testdata but we could build our own data for more isolated tests if needed - test all 3 types (Rollout, Experiment, AnalysisRun) - test both first argument completion and second argument Signed-off-by: Thomas Riccardi <[email protected]> * Revert "WIP unit-test dynamic completion" Like in kubectl own completion tests, we now have an independent 'completion' package with its own tests. Stop testing in cmd/ callers packages. This reverts commit 75eb5ae. Signed-off-by: Thomas Riccardi <[email protected]> Signed-off-by: Thomas Riccardi <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
I'm following the getting started guide on linux with auto completion on bash (https://argoproj.github.io/argo-rollouts/getting-started/).
When I hit TAB after
kubectl-argo-rollouts get rollout
, it does not auto completes the rollout names as I would expect. (for examplekubectl get pod TAB
does auto completes with existing pod names.)It would be really useful for discovery of what's inside the cluster.
Diagnostics
What version of Argo Rollouts are you running?
v1.2.0 server and kubectl plugin, on linux, bash.
Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.
The text was updated successfully, but these errors were encountered: