feat(cli): add descriptions of args/flags
This commit is contained in:
@@ -5,11 +5,18 @@ use clap::Parser;
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(version, about, long_about = None)]
|
||||
pub struct Args {
|
||||
/// word to define
|
||||
pub word: String,
|
||||
|
||||
/// language of the word
|
||||
#[arg(short, long, default_value = "en")]
|
||||
pub language: String,
|
||||
|
||||
/// parts of speech to show
|
||||
#[arg(short, long, default_values = constants::POSSIBLE_PARTS_OF_SPEECH)]
|
||||
pub parts_of_speech: Vec<String>,
|
||||
|
||||
/// show examples for definitions
|
||||
#[arg(short, long, action = clap::ArgAction::SetTrue)]
|
||||
pub examples: bool,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user