Splitting main hook/activation from mise.toml:hooks.enter/hooks.leave activation? #4217
Unanswered
AndydeCleyre
asked this question in
Q&A
Replies: 1 comment
-
Can you help me understand the workings of But AFAICT there's a single hook function that handles all hook actions, at least at the external interface. Would it be possible for me to write my own hook functions invoking mise, so that the ones for changing the environment could be in one, and the ones for running tasks in another, so that I can add them to Zsh's chpwd hook array at different times? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm wondering if this might be possible now, or in the future.
The issue is some tricky sequencing in my Zsh startup files:
Periodically I want some arbitrary programs to (re)generate their shell completion definitions.
These actions place files in an
fpath
folder, and so should be done beforecompinit
is called, which loadsfpath
contents. Some of these programs are installed via mise, so these actions should happen after mise's "main" activation.Some Zsh plugins need to be sourced after
compinit
is called, so that the completion system is available.A
mise.toml
'shooks.enter
andhooks.leave
can use these Zsh plugins (withshell = "zsh"
). So these hooks should be called after the Zsh plugins are sourced.So would it be possible to have a sequence like:
mise.toml
hooks.enter
andhooks.leave
compinit
hooks.enter
andhooks.leave
hooks.enter
andhooks.leave
?
Beta Was this translation helpful? Give feedback.
All reactions