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

hooks not working? #210

Open
franroa opened this issue Feb 9, 2024 · 2 comments
Open

hooks not working? #210

franroa opened this issue Feb 9, 2024 · 2 comments

Comments

@franroa
Copy link

franroa commented Feb 9, 2024

Hi there, I am trying to change my environment variables in fish when opening a kubie shell, but it is not working.
What is wrong in this code?

prompt:
    # Disable kubie's custom prompt inside of a kubie shell. This is useful
    # when you already have a prompt displaying kubernetes information.
    # Default: false
    disable: true
hooks:
    start_ctx: >
      set -gx TEST test
      set -Ux FOO bar
    stop_ctx: >
      set -gx TEST test
      set -Ux FOO bar

Thank you in advance!

@ctrlok
Copy link

ctrlok commented Mar 22, 2024

@franroa I had the same problem, but based on what I see in source code — hooks are not supported for fish shell yet

@Neonox31
Copy link

Neonox31 commented Mar 8, 2025

Hello,

I land here for the same reason : I cannot use hooks with fish shell.
But I found a workaround by creating a ~/.config/fish/conf.d/kubie.fish file with the following content :

function kubie_exit --on-event fish_exit
  if set -q KUBIE_ACTIVE
    echo "Goodbye from Kubie!!!"
  end
end

if set -q KUBIE_ACTIVE
  echo "Hello from Kubie!!!"
end

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

3 participants