feat: H3 help <command> per-command detail + general reference
HELP node takes an optional single-word topic (BarePath);
AppCommand::Help { topic }. note_help_topic renders the help
block(s) of every command sharing that entry word (so `help
create` covers both create forms), plus `help types` and a
friendly "no help for X" pointer for unknown topics. Full help
gains a detail-hint footer. Catalogued help.detail_hint /
help.unknown_topic; parse-error matrix updated (help now takes a
topic, so the near-miss is the multi-word case). 9 integration
tests in tests/it/help_command.rs. Mark H3 [x].
This commit is contained in:
+9
-3
@@ -492,8 +492,14 @@ pub enum Command {
|
||||
pub enum AppCommand {
|
||||
/// Exit cleanly. Accepts the `q` alias.
|
||||
Quit,
|
||||
/// Show in-app help. Body comes from `help.in_app_body`.
|
||||
Help,
|
||||
/// Show in-app help (H3). With no `topic`, the full command
|
||||
/// list + types reference; with a `topic` (a command entry
|
||||
/// word like `insert` / `create` / `show`, or `types`), the
|
||||
/// focused detail for that command (or command group sharing
|
||||
/// the entry word).
|
||||
Help {
|
||||
topic: Option<String>,
|
||||
},
|
||||
/// Rebuild `playground.db` from `project.yaml` + data/, with
|
||||
/// confirmation modal.
|
||||
Rebuild,
|
||||
@@ -910,7 +916,7 @@ impl Command {
|
||||
Self::SqlDelete { .. } => "delete from",
|
||||
Self::App(app) => match app {
|
||||
AppCommand::Quit => "quit",
|
||||
AppCommand::Help => "help",
|
||||
AppCommand::Help { .. } => "help",
|
||||
AppCommand::Rebuild => "rebuild",
|
||||
AppCommand::Save => "save",
|
||||
AppCommand::SaveAs => "save as",
|
||||
|
||||
Reference in New Issue
Block a user