fix(shell): avoid full mise hook on server zsh - #571
Open
shunk031 wants to merge 3 commits into
Open
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Server-side Zsh startup paid the full
mise activate zshhook cost even though server startup only needs the standalonemisebinary and shims. Measurements showed_mise_hook/mise hook-env -s zshcost about 40-50 ms, while the server prompt setup should remain unchanged.What Changed
eval "$(~/.local/bin/mise activate zsh)"from the common Sheldon config to the client-only Sheldon config.miseand shims viamise activate zsh --shimswithout registering_mise_hook,precmd, orchpwdhooks..zprofilesource with a template that uses shims-only startup on servers and full mise activation elsewhere..zprofiletemplate behavior.Validation
Inspect the diff for whitespace errors.
Parse the Zsh mise helper.
Render the server
.zprofiletemplate and parse it as Zsh.Render the client
.zprofiletemplate and parse it as Zsh.Parse the mise install shell sources.
Run ShellCheck for the mise install shell sources.
mise exec -- shellcheck install/common/mise.sh home/dot_config/exact_shell/mise.bashA temp-HOME Zsh smoke test confirmed fake
miseand a shimmedchezmoiare found, and_mise_hookis absent from functions,precmd_functions, andchpwd_functions.Local
batstests were not run per repository policy; GitHub Actions should validate them.