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

_complete_alias with environment variable influencing behavior #43

Open
ibotty opened this issue May 4, 2023 · 0 comments
Open

_complete_alias with environment variable influencing behavior #43

ibotty opened this issue May 4, 2023 · 0 comments

Comments

@ibotty
Copy link

ibotty commented May 4, 2023

There are commands that have different completion depending on an environment variable.

E.g. kubeconfig (and oc) will return the pods (in the configured namespace) of the cluster defined in KUBECONFIG.

so

export KUBECONFIG=/path/to/a/kube/config
kubeconfig get po [TAB]

will return the pods in the cluster (and namespace) configured in KUBECONFIG.

Now an alias like alias k-test="KUBECONFIG=/path/to/kube/config kubecfg" with _complete_alias will complete using kubecfg without the KUBECONFIG environment.

Is it possible to somehow set the environment for this specific completion?

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

1 participant