Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I use direnv but miss that it can't initialize bash completions as I enter a directory. Can mise do that?


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:

    [hooks.enter]
    shell = true
    run = ". completions/mycli.sh"
I made an issue if you'd like to track: https://github.com/jdx/mise/issues/3412


Very helpful! If this can be made to work I may switch from direnv


you should see this in tomorrow's release, or you can install with cargo from main branch now: https://github.com/jdx/mise/pull/3414


You just mentioned the only thing that bugs me with mise: the frequent (sometimes 3x per day) releases.

I say this only because I’m one of the maintainers of the MacPorts port for mise, and while I’ve automated things, I have had more than one port update be outdated before it gets merged because of these releases.

I’ve automated the PR submission steps (not with GHA, but with a shell script I run on my Mac), but after discussion with the gentleman who usually merges those PRs, we decided that we'll probably do them every 2 or 3 days.


I've settled into a mostly daily cadence. If there's a day with more than 1 it's because there is a relatively serious bug that I don't want anyone to need to wait around for—those are the releases you should actually pay attention to so you're not missing something important. It's true I used to do more but I've dialed this back in recent weeks.

That said, it's a selfish strategy that benefits me more than anyone. It ultimately means I don't spend as much time fixing bugs since resolutions go out quicker and users get to test them (often whether they want to or not) while the issue is fresh in my head and I can quickly make an adjustment if needed.

I know especially package maintainers such as yourself would prefer I have nightlies for this purpose and then less frequent releases but that's more work for me and means users generally will be testing changes with a bigger delay.

Users may also think they want this but I actually think it wouldn't serve their interests—it'd mean I spend less time actually improving mise and more time with logistics. I'm also terrible at release notes and commit messages and I'm not sure it's an area I want to improve in simply because that would come at the cost of doing other things. I also don't like doing that stuff and this is (ostensibly) a hobby after all.

That said, I'd really appreciate if you came by our discord and had a conversation about this with me. While those are my reasons for the way things are I'm also certainly not opposed to change. With homebrew I have a release hook to automate this process and perhaps we could do something similar for MacPorts. We could even automate every N releases or something if you think that would be better.


I’ve just started a new job (where I will be pitching mise to replace asdf and maybe a few other things because of your recent push on supply chain security), so it’ll be a bit of time before I can do this. I’ve thought about how to automate the process further and may do so in the holiday break week.

If I get as far as making a GitHub action for this, I will absolutely discuss with you because it would be very good to make this work as quickly as possible.


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 didn't know this. I know this ticket is open https://github.com/direnv/direnv/issues/443 but it is not clear to me if it is working for bash


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.


direnv unloads the directory's environment as soon as I leave it, so I don't have to worry about the provenance of any one given shell instance. All I have to care about is its current working dir.


...or you could use a tool somebody already wrote, which even includes a security mechanism.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: