github jdx/fnox v1.42.1
v1.42.1: Shell hooks survive mise upgrades and work with starship in PowerShell

2 hours ago

fnox 1.42.1 fixes two shell-integration problems: hooks that broke after a mise upgrade, and PowerShell hooks that didn't work correctly alongside starship.

Fixed

  • Shell hooks breaking after a mise upgrade (#1016) by @jdx. fnox activate used to put the fully resolved binary path, such as .../installs/fnox/1.42.0/fnox, into the shell hook. When mise upgrade deleted that directory, every prompt printed _fnox_hook: no such file or directory, and fnox deactivate failed too. These changes apply:
    • fnox now writes the path you ran it from into the hook, keeping symlinks. To get hooks that keep working after upgrades, activate through a stable path:
      eval "$(~/.local/share/mise/installs/fnox/latest/fnox activate zsh)"
      A plain eval "$(fnox activate zsh)" that finds fnox through a versioned PATH entry still writes that versioned path into the hook.
    • In bash, zsh and fish, fnox deactivate now removes the hooks and the fnox function even if the binary is gone. To recover, run fnox deactivate and then activate again. When you activate again, fnox still unsets the secrets that were loaded before.
    • Binary paths in the generated bash, zsh and fish hooks are now quoted, so paths containing spaces work.
    • Nushell and PowerShell hooks still use the old behavior.
  • PowerShell hooks with starship (#1020) by @jdx. fnox activate pwsh now works whether it's loaded before or after starship:
    • If fnox loaded first, starship replaced the prompt function and cd stopped loading and unloading secrets. The hook now also runs when the current location changes. It passes the event on to any existing handler, and fnox deactivate puts the previous handler back.
    • If starship loaded first, the prompt showed failed commands as successful. The hook now keeps $? and $LASTEXITCODE intact.
    • Each change summary (for example fnox: +1 KEY) is now printed once instead of twice.

Full Changelog: v1.42.0...v1.42.1

💚 Sponsor fnox

fnox is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.

If fnox handles secrets or config for you or your team, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep fnox secure, free, and independent.

Don't miss a new fnox release

NewReleases is sending notifications on new releases.