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

shell autocomplete for k8s flags #2477

Merged
merged 1 commit into from
Jan 17, 2024
Merged

Conversation

wjiec
Copy link
Contributor

@wjiec wjiec commented Jan 16, 2024

This PR has resolved the following two issues:

  1. panic should not occur when dealing with incorrect command line flags.
  2. Introduce autocomplete functionality for flags context, cluster, user, and namespace.

fixes #2471.

Copy link
Owner

@derailed derailed left a comment

Choose a reason for hiding this comment

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

@wjiec Nice!! Thanks for these updates Jayson!

@@ -44,11 +47,19 @@ var (
out = colorable.NewColorableStdout()
)

type FlagError struct{ err error }
Copy link
Owner

Choose a reason for hiding this comment

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

Do we need it to be exported?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, this type does not need to be exported. make the private when your release the next version or i have a new pr? 🤦

Copy link
Owner

Choose a reason for hiding this comment

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

Thank you Jayson! I made a few updates on this. Made additional changes.
Please take a peek when I update next.

@derailed derailed added enhancement New feature or request question Further information is requested InProgress Marks an issue has being worked on labels Jan 16, 2024
Copy link
Owner

@derailed derailed left a comment

Choose a reason for hiding this comment

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

@wjiec Figured I'll roll this in for the next drop. Will update per comments.

@derailed derailed merged commit 66cb682 into derailed:master Jan 17, 2024
3 checks passed
@wjiec wjiec deleted the feat/shell-autocomp branch January 17, 2024 02:00
@waddles
Copy link

waddles commented Jan 17, 2024

Thanks guys 😍

@derailed
Copy link
Owner

@waddles Thank you! Tho all the credits should go to @wjiec for his quick resolution!

@derailed derailed mentioned this pull request Jan 18, 2024
thejoeejoee pushed a commit to thejoeejoee/k9s that referenced this pull request Feb 23, 2024
placintaalexandru pushed a commit to placintaalexandru/k9s that referenced this pull request Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request InProgress Marks an issue has being worked on question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shell autocomplete functions do not work correctly
3 participants