From 72c57380883a1c1cc796dea6d35048ab5bed5f53 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Thu, 12 Mar 2026 19:04:12 +0800 Subject: Add helpdoc system with interactive viewer --- src/cmds/cmd/hexdump.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/cmds/cmd/hexdump.rs') diff --git a/src/cmds/cmd/hexdump.rs b/src/cmds/cmd/hexdump.rs index 66022ef..928b626 100644 --- a/src/cmds/cmd/hexdump.rs +++ b/src/cmds/cmd/hexdump.rs @@ -6,9 +6,12 @@ use crate::{ arg::single_file::JVSingleFileArgument, collect::single_file::JVSingleFileCollect, r#in::empty::JVEmptyInput, out::hex::JVHexOutput, }, - systems::cmd::{ - cmd_system::JVCommandContext, - errors::{CmdExecuteError, CmdPrepareError}, + systems::{ + cmd::{ + cmd_system::JVCommandContext, + errors::{CmdExecuteError, CmdPrepareError}, + }, + helpdoc::helpdoc_viewer, }, }; use cmd_system_macros::exec; @@ -20,8 +23,9 @@ type Arg = JVSingleFileArgument; type In = JVEmptyInput; type Collect = JVSingleFileCollect; -fn help_str() -> String { - "Hello".to_string() +async fn help_str() -> String { + helpdoc_viewer::display("commands/hexdump").await; + String::new() } async fn prepare(_args: &Arg, _ctx: &JVCommandContext) -> Result { -- cgit