Only load fnm sheldon plugin on macOS

On the server, fnm isn't installed since system nodejs is used instead.
The zsh-fnm plugin's own fallback silently curl-installs fnm when missing,
and its --use-on-cd hook then prompts on every cd since no default version
is fnm-managed there. Gate the plugin to Darwin only.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3jcSVn51hiw58f7jPWrpN
This commit is contained in:
Jonny Barnes 2026-08-04 22:29:51 +01:00
commit 43e5d5ed85
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8

View file

@ -79,7 +79,14 @@ apply = ["defer"]
[plugins.fnm]
github = "dominik-schwabe/zsh-fnm"
apply = ["defer"]
hooks.pre = 'export ZSH_FNM_ENV_EXTRA_ARGS="--use-on-cd --version-file-strategy recursive --resolve-engines false"'
# Linux boxes (e.g. the server) intentionally use the distro nodejs package
# instead of fnm, so only load this plugin on macOS. Otherwise the plugin's
# own fallback silently curl-installs fnm and its --use-on-cd hook then
# prompts on every cd since no version is fnm-managed there.
hooks.pre = '''
if [[ "$OSTYPE" == darwin* ]]; then
export ZSH_FNM_ENV_EXTRA_ARGS="--use-on-cd --version-file-strategy recursive --resolve-engines false"'''
hooks.post = "fi"
[plugins.zoxide]
github = "ajeetdsouza/zoxide"