From 44a83fe03bea53a6d4e3c15b84e4f1f491bfdba3 Mon Sep 17 00:00:00 2001 From: Steppy Date: Thu, 12 Dec 2024 12:07:07 +0100 Subject: [PATCH] Add file_name argument --- src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 1a515b4..a28a6cf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -42,12 +42,15 @@ enum Command { /// How to handle older versions of the file #[arg(short = 'a', long, default_value = "delete", default_missing_value = "archive", num_args = 0..1)] old_version_policy: OldVersionPolicy, - /// The directory where to upload to + /// The directory where to upload to, relative to the server directory #[arg(short = 'p', long, default_value = "plugins")] upload_directory: PathBuf, /// Skip the confirmation dialog #[arg(long, default_value = "false", default_missing_value = "true", num_args = 0..1)] no_confirm: bool, + /// The prefix of the name of older versions of the file, which should be replaced or deleted + #[arg(short, long)] + file_name: Option, }, /// Execute a command on the servers #[command(visible_short_flag_alias = 'c')] @@ -95,6 +98,7 @@ fn main() -> Result<(), String> { old_version_policy, upload_directory, no_confirm, + file_name, } => { todo!() }