From 599b1b7d9f657ed9c36bdcbece8c771db4422bab Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sat, 3 Jan 2026 15:09:58 +0800 Subject: Add info command to display file details --- src/bin/jv.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/bin') diff --git a/src/bin/jv.rs b/src/bin/jv.rs index 09dfae2..128c910 100644 --- a/src/bin/jv.rs +++ b/src/bin/jv.rs @@ -143,6 +143,9 @@ enum JustEnoughVcsWorkspaceCommand { #[command(alias = "s")] Status(StatusArgs), + /// Display detailed information about the specified file + Info(InfoArgs), + // Sheet management /// Manage sheets in the workspace #[command(subcommand, alias = "sh")] @@ -459,6 +462,15 @@ struct StatusArgs { help: bool, } +#[derive(Parser, Debug)] +struct InfoArgs { + /// Show help information + #[arg(short, long)] + help: bool, + + file_pattern: Option, +} + #[derive(Parser, Debug)] struct AccountAddArgs { /// Show help information @@ -1022,6 +1034,13 @@ async fn main() { } jv_status(status_args).await; } + JustEnoughVcsWorkspaceCommand::Info(info_args) => { + if info_args.help { + println!("{}", md(t!("jv.info"))); + return; + } + jv_info(info_args).await; + } JustEnoughVcsWorkspaceCommand::Sheet(sheet_manage) => match sheet_manage { SheetManage::Help => { println!("{}", md(t!("jv.sheet"))); @@ -1983,6 +2002,8 @@ async fn jv_status(_args: StatusArgs) { } } +async fn jv_info(args: InfoArgs) {} + async fn jv_sheet_list(args: SheetListArgs) { let _ = correct_current_dir(); -- cgit