From 0a4d75d8629610d127d6a78790e17f5bc48cf1b7 Mon Sep 17 00:00:00 2001 From: Vyncint Ng <115854244+vyncint@users.noreply.github.com> Date: Mon, 24 Aug 2026 14:54:04 +0700 Subject: [PATCH] fix: line up the columns in the two messages that offer a way out MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both are first-run paths, and both are what somebody reads when mossaic has just refused to do the thing they asked for. `could not detect a GitHub user` listed three ways forward with one of them two columns out of line, and put `--demo` last — the only one of the three that needs no account, no network and no decision, which makes it the one to lead with. The missing-file message was mine, from an hour ago, and it tried to align a column against an interpolated path. That cannot work: the path is however long the reader typed. It also repeated the path back inside the suggestion, where it was noise — they know what they typed; what they need is the shape of the command. `FILE` says that and lines up. Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com> --- CHANGELOG.md | 6 ++++++ src/main.rs | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1edd75..2af3826 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,12 @@ listed under a **Changed** or **Removed** heading. - **`--font` no longer tells its readers to edit `src/art.rs`.** It printed a note meant for contributors to everyone who ran it. +- **The two guidance messages line their columns up.** `could not detect a + GitHub user` put one of its three suggestions two columns out, and the + `--demo` line — the one that needs no account at all — came last. The + missing-file message tried to align against an interpolated path, which + cannot be done, and repeated back a path the reader had just typed. + - **`brew install vyncint/tap/mossaic`.** The formula is generated by the release itself from the checksums the archives produced, so it cannot diff --git a/src/main.rs b/src/main.rs index 8506b5e..e4022e5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -116,8 +116,8 @@ fn main() { if !Path::new(path).is_file() { fail(&format!( "no calendar file at {path}\n\n \ - mossaic-art TEXT --snapshot {path} write one\n \ - mossaic --demo a sample year instead" + mossaic-art TEXT --snapshot FILE write one\n \ + mossaic --demo a sample year instead" )); } } @@ -396,9 +396,9 @@ fn parse_args() -> Option { let login = login.or_else(github::whoami).unwrap_or_else(|| { fail( "could not detect a GitHub user.\n\n \ - mossaic chart someone by name\n \ - gh auth login authenticate, then just `mossaic`\n \ - mossaic --demo see what it looks like first", + mossaic chart someone by name\n \ + mossaic --demo see what it looks like first\n \ + gh auth login authenticate, then just `mossaic`", ) }); Some(Invocation {