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:
parent
8cc69aa6f3
commit
43e5d5ed85
1 changed files with 8 additions and 1 deletions
|
|
@ -79,7 +79,14 @@ apply = ["defer"]
|
||||||
[plugins.fnm]
|
[plugins.fnm]
|
||||||
github = "dominik-schwabe/zsh-fnm"
|
github = "dominik-schwabe/zsh-fnm"
|
||||||
apply = ["defer"]
|
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]
|
[plugins.zoxide]
|
||||||
github = "ajeetdsouza/zoxide"
|
github = "ajeetdsouza/zoxide"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue