chore: strip emoji and decorative glyphs from CLI output#189
Merged
Conversation
Adopt the lowercase-prefix convention used by serious dev tools (gcc, rustc, clippy, go) for status messages, and drop decorative emoji that were inherited from earlier prototypes. Rationale: - Emoji and unusual glyphs in CLI output break programmatic consumption (grep / awk / jq / log shippers must handle multi-byte noise), break alignment in fixed-width displays (most emoji are East-Asian-Wide and occupy 2 cells inconsistently across terminals), and turn into '?' on non-UTF-8 transports (serial consoles, some log re-encoders, older Windows terminals). - The recent CI failure on #188 (`TestRepoLifecycle` couldn't find 'v1' because the update banner was in the buffer) is the natural consequence of putting decorative output through stdout. - None of the tools we want vers-cli to feel adjacent to (git, go, cargo, kubectl, terraform, docker, aws, gcloud, ripgrep) decorate their output with emoji. The closest, `gh`, uses only the Unicode check/cross glyphs and TTY-gates them. Replacements applied: ✓ <message> -> <message> (drop; success implied) ✗ <message> -> error: <message> (lowercase compiler-style prefix)⚠️ <message> -> warning: <message> 💡 <message> -> note: <message> 📧 Verification email -> Verification email (drop; text already explanatory) Println("✓") -> Println("ok") Println("✗") -> Println("failed") ├─ / └─ -> |- / \\- (ASCII tree in commit lineage) → -> -> (ASCII arrow everywhere) Also lowercased the first character following the new lowercase prefixes (`error: failed to ...` rather than `error: Failed to ...`) to match clippy/rustc/gcc convention exactly. Output changes are user-facing but minor; they make grepping CLI output more reliable and the project look less prototype-y. No behavior changes.
5a54b58 to
7a9e024
Compare
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
Decorative glyphs in CLI output are out of place for a tool that wants to feel like infrastructure rather than a prototype. Survey of tools we want to be aesthetically adjacent to:
git,go,cargo,rustc,kubectl,terraform,docker,aws,gcloud,ripgrep,fd,batgh✓/✗for check status, gated onisTTY()with ASCII fallbacknpmyarnv1Concrete reasons it's not just aesthetic:
grep/awk/jqor parsed by another script has to deal with multi-byte clutter. The CI failure on fix(update): make "update available" nag actually print #188 was a clean example:TestRepoLifecyclecouldn't find"v1"invers repo tag list -qoutput because💡 vers update available...was in the same buffer.⚠️is a 2-codepoint sequence (U+26A0+ VS-16) that renders as 1 or 2 cells depending on terminal/font, so any column-aligned output desyncs.?or raw bytes.What
Adopt the lowercase-prefix convention used by
gcc/rustc/clippy/go:✓ <message><message>✗ <message>error: <message>⚠️ <message>warning: <message>💡 <message>note: <message>📧 Verification email sent…Verification email sent…fmt.Println("✓")fmt.Println("ok")fmt.Println("✗")fmt.Println("failed")├─/└─(commit lineage tree)/-`→->Also lowercased the first character following the new prefixes (
error: failed to delete ..., noterror: Failed to delete ...) so it reads as one sentence, matching clippy/rustc/gcc exactly.Scope and non-changes
go build ./... && go vet ./... && go test ./...(unit) all pass.// ── Section ──) are left alone — they're cosmetic, never appear in output, and removing them is bikeshedding.éincmd/env_test.gotest data ({"café", false}) is intentional non-ASCII test data and is left alone.Followups not in this PR (worth a separate cleanup)
While auditing I noticed several places that print errors to stdout rather than stderr (e.g.
internal/presenters/deletion_presenter.go:37). That's a real "treat this like a serious dev tool" defect — error output should not contaminatevers ... | jqstyle pipelines — but it's a behavior change, not a glyph swap, so it doesn't belong in this PR. Happy to do a follow-up.Interaction with #188
This branches from
mainand is independent of #188. If #188 lands first, this needs a trivial rebase to also rewrite the💡in the newprintUpdateBanner(which #188 already routes to stderr). If this lands first, #188 needs to usenote:from the start in its banner. Either order works.