I use direnv but miss that it can't initialize bash completions as I enter a directory. Can mise do that?
Direnv can do this, but currently only for bash shells and maybe only when using nix flakes. There is an open issue to get zsh working, but I just stick to bash TBH
I don't really understand why people use direnv, but you could easily replace it with a shell script that could load anything you want when entering a directory.
You basically just write a script that hooks into your shell (using your shell's existing hooks, like PROMPT_COMMAND for bash) and have it load a shell script in any directory you enter.
Obviously this is a security risk, as you could enter a directory controlled by a hacker. This is why (presumably) they only deal with exported variables, though even that's dangerous.
there isn't a hook for executing shell source, but it would be possible to add I think. The current hooks already execute inside of a shell function so there would just need to be a way to declare that you want a hook to run inside the shell, maybe like this:
I made an issue if you'd like to track: https://github.com/jdx/mise/issues/3412