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 activateused to put the fully resolved binary path, such as.../installs/fnox/1.42.0/fnox, into the shell hook. Whenmise upgradedeleted that directory, every prompt printed_fnox_hook: no such file or directory, andfnox deactivatefailed 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:
A plain
eval "$(~/.local/share/mise/installs/fnox/latest/fnox activate zsh)"
eval "$(fnox activate zsh)"that finds fnox through a versionedPATHentry still writes that versioned path into the hook. - In bash, zsh and fish,
fnox deactivatenow removes the hooks and thefnoxfunction even if the binary is gone. To recover, runfnox deactivateand 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.
- 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:
- PowerShell hooks with starship (#1020) by @jdx.
fnox activate pwshnow works whether it's loaded before or after starship:- If fnox loaded first, starship replaced the prompt function and
cdstopped loading and unloading secrets. The hook now also runs when the current location changes. It passes the event on to any existing handler, andfnox deactivateputs the previous handler back. - If starship loaded first, the prompt showed failed commands as successful. The hook now keeps
$?and$LASTEXITCODEintact. - Each change summary (for example
fnox: +1 KEY) is now printed once instead of twice.
- If fnox loaded first, starship replaced the prompt function and
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.