The help was `sed -n '2,9p' "$0"` — the script scraping its own header comment by line number — with no sections, no per-command help, no `-h`, and no `--version`. Worse, parts of the interface it described weren't real: `--force` was parsed and never read, so `claudebox rm work` force-deleted a running box with no confirmation while advertising a flag that implied the bare form was the careful one. - usage()/help_cmd(): NAME/USAGE/COMMANDS/OPTIONS/EXAMPLES/EXIT STATUS, plus a page per command. `claudebox help <cmd>` and `claudebox <cmd> --help`. - `-h`/`--help` anywhere; `--version`/`-V` (VERSION file). - Unknown command → stderr, exit 2, and a did-you-mean by edit distance. - Unknown options are rejected, not swallowed as positionals: `snapshot work --labl x` no longer names the snapshot "--labl". `--` still passes everything through for exec. - `--force` is real: `rm` confirms on a TTY, refuses without one unless forced. BEHAVIOR CHANGE — a scripted `claudebox rm` now needs `--force`. - Exit 2 for usage errors, 1 for runtime failures; accurate per-command usage strings (`exec` no longer omits `-- <cmd...>`). - shellcheck is clean: SC2034 (dead `force`) and SC2015 both gone. Closes #8
1 line
6 B
Text
1 line
6 B
Text
0.2.0
|