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

Inject script when opening the virtual terminal #102

Open
franroa opened this issue Mar 10, 2022 · 0 comments
Open

Inject script when opening the virtual terminal #102

franroa opened this issue Mar 10, 2022 · 0 comments

Comments

@franroa
Copy link

franroa commented Mar 10, 2022

It would be really awesome if we could run code inside the virtual terminal when selecting a new context.
For example, When I have to install my cluster I am getting information out of the current context to apply to the cluster, like this:

      function init_cluster() {
          account_name=$(echo `kubie info ctx` | cut -d/ -f 2)
          cluster_name=$(echo `kubie info ctx` | cut -d/ -f 3)
          export account="$account_name"
          export cluster="$cluster_name"
      }

Could it be possible to inject such a function when changing the context?
Thanks!

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