diff --git a/cli/src/args.rs b/cli/src/args.rs index ecf876d00..1fd5282d0 100644 --- a/cli/src/args.rs +++ b/cli/src/args.rs @@ -186,6 +186,8 @@ pub mod resource { ::Value: Sized, Self: Sized; + /* fn print_help(&self) -> String; */ + #[cfg(test)] fn parse_argv_from( &self, diff --git a/cli/src/args/compress/resource.rs b/cli/src/args/compress/resource.rs index a7a260c12..696f78196 100644 --- a/cli/src/args/compress/resource.rs +++ b/cli/src/args/compress/resource.rs @@ -82,6 +82,33 @@ pub mod argv { impl error::Error for OutputTypeError {} impl ArgvResource for OutputFlagsResource { + /* fn print_help(&self) -> String { */ +/* r#" */ +/* Output flags (OUTPUT-FLAGS): Where and how to write the generated zip archive. */ + +/* If not specified, output is written to stdout. */ + +/* OUTPUT-FLAGS = [--append] --output-file */ +/* = --stdout */ + +/* -o, --output-file */ +/* Output zip file path to write. */ + +/* The output file is truncated if it already exists, unless --append is */ +/* provided. */ + +/* --append */ +/* If an output path is provided with -o, open it as an existing zip */ +/* archive and append to it. */ + +/* If the output path does not already exist, no error is produced, and */ +/* a new zip file is created at the given path. */ + +/* --stdout */ +/* Allow writing output to stdout even if stdout is a tty. */ +/* "# */ +/* } */ + type ArgvParseError = OutputTypeError; fn parse_argv( &self, diff --git a/cli/src/print.rs b/cli/src/print.rs index 404dfe574..09b5263d3 100644 --- a/cli/src/print.rs +++ b/cli/src/print.rs @@ -40,7 +40,24 @@ pub mod printer { } } -pub trait HelpSection {} +pub trait HelpCase { + fn value(&self) -> &str; + fn description(&self) -> String; + fn extended_description_with_caveats_and_defaults(&self) -> Option; +} + +pub trait HelpSection { + fn name(&self) -> &str; + fn id(&self) -> &str; + fn description(&self) -> Option; + fn extended_description_with_caveats_and_defaults(&self) -> Option; + fn cases(&self) -> Vec>; + fn post(&self) -> Option; +} + +pub struct FlagsSection {} + +pub struct StringPattern {} pub enum HelpVerbosity { NameOnly,