add help for each argument

This commit is contained in:
Dmitriy Pleshevskiy 2022-08-02 11:43:26 +03:00
parent 1a6dfb8d46
commit ca299ad81d
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215

View file

@ -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>,
} }