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

Clarify documentation for completion #1310

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marckhouzam
Copy link
Collaborator

@marckhouzam marckhouzam commented Jan 4, 2021

It was pointed out on Slack that there is no explanation in the docs of what the toComplete parameter represents for ValidArgsFunction.

This PR explains with examples the toComplete and the args parameters of ValidArgsFunction.

A section is also added to explain about fuzzy completions.

@marckhouzam
Copy link
Collaborator Author

I believe the test failures are because of the 2020 years that need to be updated, see #1309

shell_completions.md Outdated Show resolved Hide resolved
@github-actions
Copy link

This PR is being marked as stale due to a long period of inactivity

@marckhouzam
Copy link
Collaborator Author

I forgot about this one. I will rework it.

@marckhouzam marckhouzam reopened this Mar 29, 2022
@marckhouzam marckhouzam added area/shell-completion All shell completions kind/documentation Documentation of cobra itself and removed kind/stale labels Mar 29, 2022
@CLAassistant
Copy link

CLAassistant commented Jul 21, 2022

CLA assistant check
All committers have signed the CLA.

Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
@github-actions github-actions bot removed the area/shell-completion All shell completions label Nov 23, 2023
@marckhouzam marckhouzam added this to the 1.9.0 milestone Nov 23, 2023
@marckhouzam
Copy link
Collaborator Author

This documentation-only PR is ready for review @jpmcb

Copy link
Contributor

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM better late than never.

Comment on lines +177 to +178
Run: func(cmd *cobra.Command, args []string) {
RunStatus(args[0])
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure why this is changed but it shouldn't matter either way as it is an example only so I am fine with that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That was just a cleanup. The example is about the helm status command but I had left the function call to RunGet which was a copy/paste from the kubectl get example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Documentation of cobra itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants