Skip to content

chore: strip emoji and decorative glyphs from CLI output#189

Merged
AlephNotation merged 1 commit into
mainfrom
chore/strip-emojis
May 7, 2026
Merged

chore: strip emoji and decorative glyphs from CLI output#189
AlephNotation merged 1 commit into
mainfrom
chore/strip-emojis

Conversation

@AlephNotation
Copy link
Copy Markdown
Contributor

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:

Tool Emoji in output?
git, go, cargo, rustc, kubectl, terraform, docker, aws, gcloud, ripgrep, fd, bat None
gh Only / for check status, gated on isTTY() with ASCII fallback
npm Used to, removed
yarn v1 Famously did, removed in v2/berry after backlash

Concrete reasons it's not just aesthetic:

  • Breaks programmatic consumption. Anything piped through grep/awk/jq or 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: TestRepoLifecycle couldn't find "v1" in vers repo tag list -q output because 💡 vers update available... was in the same buffer.
  • Breaks alignment. Most emoji are East-Asian-Wide (2 cells) and ⚠️ 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.
  • Breaks on non-UTF-8 transports. Serial consoles, some SSH multiplexers, older Windows terminals, log shippers that re-encode — all turn emoji into ? or raw bytes.

What

Adopt the lowercase-prefix convention used by gcc/rustc/clippy/go:

Before After Notes
✓ <message> <message> drop — success implied by exit code 0
✗ <message> error: <message> lowercase compiler-style prefix
⚠️ <message> warning: <message>
💡 <message> note: <message>
📧 Verification email sent… Verification email sent… text is already explanatory
fmt.Println("✓") fmt.Println("ok") for "doing thing... ok" progress lines
fmt.Println("✗") fmt.Println("failed")
├─ / └─ (commit lineage tree) ` -/-`
-> everywhere — output strings, comments

Also lowercased the first character following the new prefixes (error: failed to delete ..., not error: Failed to delete ...) so it reads as one sentence, matching clippy/rustc/gcc exactly.

Scope and non-changes

  • Pure output cleanup. No behavior changes, no flag changes, no API surface changes.
  • 31 files touched, exactly +122/-122 lines (every replacement is 1:1).
  • go build ./... && go vet ./... && go test ./... (unit) all pass.
  • Box-drawing dividers in code comments (// ── Section ──) are left alone — they're cosmetic, never appear in output, and removing them is bikeshedding.
  • The é in cmd/env_test.go test 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 contaminate vers ... | jq style 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 main and is independent of #188. If #188 lands first, this needs a trivial rebase to also rewrite the 💡 in the new printUpdateBanner (which #188 already routes to stderr). If this lands first, #188 needs to use note: from the start in its banner. Either order works.

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.
@AlephNotation AlephNotation merged commit dc90463 into main May 7, 2026
6 checks passed
@AlephNotation AlephNotation deleted the chore/strip-emojis branch May 7, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant