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

Show [] in path, if entry is a list. #44

Closed
guettli opened this issue Nov 22, 2024 · 7 comments
Closed

Show [] in path, if entry is a list. #44

guettli opened this issue Nov 22, 2024 · 7 comments

Comments

@guettli
Copy link

guettli commented Nov 22, 2024

kubectl-explore shows me this path:

deployments.spec.template.spec.containers.terminationMessagePath

I know that below "containers" a list is required. It would be nice to make this more obvious, because for custom CRDs I don't always know that.

The output of gron uses [] to indicate that.

What about showing this path, if a list is required?

deployments.spec.template.spec.containers[].terminationMessagePath
@keisku
Copy link
Owner

keisku commented Nov 25, 2024

@guettli

Thank you for your feedback!
I would like to add --show-brackets (false by default) to show [] in the path.

@keisku
Copy link
Owner

keisku commented Nov 30, 2024

@guettli Can you check the GIF in the #45 ? Is the behavior that you want?

@guettli
Copy link
Author

guettli commented Nov 30, 2024

@keisku thank you very much. This looks good. Why not enable that by default?

@keisku
Copy link
Owner

keisku commented Dec 1, 2024

I want the PATH output from kubectl-explore to be usable as-is with kubectl-explain by default.

kubectl explain deployments.spec.template.spec.containers[].terminationMessagePath
error: invalid jsonpath syntax, first node must be field node

@guettli
Copy link
Author

guettli commented Dec 1, 2024

Good Point. I think about an alternative solution.

What about showing list in bold font and different color?

@keisku
Copy link
Owner

keisku commented Dec 7, 2024

What about showing list in bold font and different color?

I think it should be addressed in a different issue. I am going to close this issue with #45.

If you want to show list in bold font and different color, can you make a PR for it? I am happy to review it!

@keisku keisku closed this as completed Dec 7, 2024
@keisku
Copy link
Owner

keisku commented Dec 7, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants