Skip to content

fix(cli): name the replacement of a command 0.8.0 removed - #1052

Merged
navidemad merged 2 commits into
mainfrom
fix/removed-command-hint
Oct 16, 2026
Merged

navidemad merged 2 commits into
mainfrom
fix/removed-command-hint

Conversation

@navidemad

@navidemad navidemad commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1047

Summary

A command name 0.8.0 removed (the 41 pre-rename aliases #965 dropped) now prints one stderr line naming its replacement, pixel: 'ready' was removed in 0.8.0; use pixel prepare-repo``, plus the plugin install command when the replacement moved to an uninstalled plugin, and exits 2. The names stay removed: no alias comes back.

 plugin_cmd::plan (unknown subcommand)
   installed plugin of that name        → run it
   moved to a plugin (invoke.rs)        → "moved to a plugin: pixel install …"
+  removed_commands::removed_hint       → "'<old>' was removed in 0.8.0; use `pixel <new>`"
   else                                 → clap's error, unchanged

Evidence

  • Before: pixel ready → error: unrecognized subcommand 'ready' / tip: a similar subcommand exists: 'rename'.
  • After: cargo test -p pixel-cli --test cli -- plugin_cli:: docs_drift:: → 62 passed, including a_removed_command_names_its_replacement_and_nothing_else (stderr names prepare-repo, never rename; exit 2; empty stdout; no action-log line) and an_old_hook_entry_still_fails_open; an unknown name still gets clap's error.
  • cargo test -p pixel-cli --bin pixel -- removed_commands plugin_cmd::tests → 16 passed: the table is the 41 aliases of 74b53a19^, sorted and unique; no removed name parses; every replacement exists (built-in or plugin command); check-release, published by a plugin but still built in, is named alone; the install line disappears once the plugin runs.
  • fmt, clippy -p pixel-cli --all-targets -D warnings and prepare.sh --check clean. Not run locally: the full workspace suite (CI).

Merge Danger

Door: two-way: error wording only.

Blast radius: one op: what an unknown subcommand prints when it is a removed name. pixel hook … still fails open before reaching it.

Possible textual conflict with #1050 (both touch crates/pixel/src/plugin_cmd.rs and tests/cli/plugin_cli.rs).

Docs touched

.github/changelog.d/removed-command-hint.fixed.md; ARCHITECTURE.md (how unknown subcommands are dispatched).

navidemad and others added 2 commits October 16, 2026 23:22
`pixel ready` and the 40 other pre-rename aliases #965 dropped got
clap's "a similar subcommand exists: 'rename'". The unknown-command
dispatch now names the current command (with the plugin install line
when it moved to a plugin no plugin provides), exits 2 and runs nothing.
The names stay removed; `pixel hook …` still fails open first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@navidemad
navidemad merged commit 525ddaa into main Oct 16, 2026
18 checks passed
@navidemad
navidemad deleted the fix/removed-command-hint branch October 16, 2026 21:56
LivioGama pushed a commit that referenced this pull request Nov 25, 2026
`pixel ready` and the 40 other pre-rename aliases #965 dropped got
clap's "a similar subcommand exists: 'rename'". The unknown-command
dispatch now names the current command (with the plugin install line
when it moved to a plugin no plugin provides), exits 2 and runs nothing.
The names stay removed; `pixel hook …` still fails open first.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

cli: a command removed in 0.8.0 gets clap's 'similar subcommand' tip instead of its replacement

1 participant