feat: with arg descriptions

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2023-07-02 01:00:04 +02:00
parent a483e28a70
commit 506a8e4a4e
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912
2 changed files with 5 additions and 0 deletions

View File

@ -49,6 +49,10 @@ pub fn build_scripts(cli: CuddleCli) -> Vec<Command> {
arg_val = arg_val.default_value(def);
}
if let Some(desc) = &arg_flag.description {
arg_val = arg_val.help(&*desc.clone().leak())
}
cmd.arg(arg_val)
}
};

View File

@ -12,6 +12,7 @@ pub enum CuddleBase {
#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct CuddleShellScriptArgEnv {
pub key: String,
pub description: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Deserialize)]