add help for each argument
This commit is contained in:
parent
1a6dfb8d46
commit
ca299ad81d
1 changed files with 19 additions and 4 deletions
23
src/cli.rs
23
src/cli.rs
|
@ -35,15 +35,30 @@ under certain conditions;
|
||||||
"
|
"
|
||||||
)]
|
)]
|
||||||
pub struct Args {
|
pub struct Args {
|
||||||
#[clap(short = 'f', long, default_value = ".env")]
|
#[clap(
|
||||||
|
short = 'f',
|
||||||
|
long,
|
||||||
|
default_value = ".env",
|
||||||
|
help = "Change source file with environment variables"
|
||||||
|
)]
|
||||||
pub file: PathBuf,
|
pub file: PathBuf,
|
||||||
|
|
||||||
#[clap(short = 'o', long)]
|
#[clap(
|
||||||
|
short = 'o',
|
||||||
|
long,
|
||||||
|
help = "Change output file with modified environment variables. It uses `file` argument by default if the output is not specified"
|
||||||
|
)]
|
||||||
pub output: Option<PathBuf>,
|
pub output: Option<PathBuf>,
|
||||||
|
|
||||||
#[clap(long)]
|
#[clap(
|
||||||
|
long,
|
||||||
|
help = "Writes modified environment variables to stdout instead of a file. `Output` argument will be ignored."
|
||||||
|
)]
|
||||||
pub dry_run: bool,
|
pub dry_run: bool,
|
||||||
|
|
||||||
#[clap(value_parser)]
|
#[clap(
|
||||||
|
value_parser,
|
||||||
|
help = "Environment varible sections that will be enabled"
|
||||||
|
)]
|
||||||
pub sections: Vec<String>,
|
pub sections: Vec<String>,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue