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

Support ArgoCD context in prompt #2762

Open
mhagnumdw opened this issue Sep 23, 2024 · 1 comment
Open

Support ArgoCD context in prompt #2762

mhagnumdw opened this issue Sep 23, 2024 · 1 comment

Comments

@mhagnumdw
Copy link

It is possible to get the context of argocd like this: argocd context | grep '^*' | awk '{print $2}'

It is also possible to get the current context from the ~/.config/argocd/config file under the current-context key.

Visualizing the current context helps a lot in your day-to-day work if you work on multiple kubernetes/openshift clusters. It's the same logic for the kubectl (kubernetes) and oc (openshift) commands.

@romkatv
Copy link
Owner

romkatv commented Sep 23, 2024

You can implement it as a custom prompt segment. Type p10k help segment to see the docs and search for "prompt_example" in ~/.p10k.zsh.

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