feat!: rebuild message output with safe auto formatting - #457
Merged
Conversation
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.
Summary
--auto=safeformatting the default for+zi-message+zi-progress+zi-messageand+zi-progressas monitored public contract surfaces with SHA-pinned wiki evidenceCloses #456.
Companion documentation: z-shell/wiki#897
Migration plan
The default auto mode changes from the legacy context-sensitive formatter to deterministic
saferecognition. Callers that need exact unformatted bytes should use--literal, or combine--auto=off --color=never. Callers that intentionally relied on command, function, plugin-directory, or filesystem discovery should opt into--auto=contextualor configurezstyle ':zi:message' auto contextual.+zi-messagenow terminates normal messages with LF unless-nis supplied. Progress updates that require carriage-return behavior should use+zi-progress. Option-like message text must follow--, and invalid options now fail with status 2 instead of passing through ambiguously.The public-contract analyzer reports only informational definition and consumer-evidence additions, so no destructive contract-impact disposition marker is required.
Public contract impact
message-outputandmessage-progresssurfacesValidation
zsh -f -n zi.zsh lib/zsh/autoload.zsh tests/message-formatting.zshzcompile -Rforzi.zshtests/message-formatting.zsh, including 27 behavior groupsNO_COLORactionlintgit diff --checkDocumentation
The companion guide documents the rendering pipeline, safe and contextual auto modes, options, semantic levels, color policy, progress output, migration examples, and compatibility boundaries.