Update help text variable names
This commit is contained in:
parent
4974abef37
commit
c5e962ef43
21
README.md
21
README.md
|
@ -10,21 +10,20 @@ currency-exchange --interactive
|
|||
```
|
||||
More information on usage:
|
||||
```
|
||||
Usage: currency-exchange [OPTIONS] [CURRENCY_FROM] [CURRENCY_TO] [VALUE]
|
||||
Usage: currency-exchange [OPTIONS] [Currency input] [Currency target] [Amount]
|
||||
|
||||
Arguments:
|
||||
[CURRENCY_FROM] Currency code to exchange from
|
||||
[CURRENCY_TO] Currency code to exchange to
|
||||
[VALUE] Currency amount to exchange
|
||||
[Currency input] Currency code to exchange from
|
||||
[Currency target] Currency code to exchange to
|
||||
[Amount] Currency amount to exchange
|
||||
|
||||
Options:
|
||||
-k, --set-api-key <API_KEY> Set api key
|
||||
-r, --recreate-cache Recrate cache
|
||||
-i, --interactive Interactive mode
|
||||
-l, --list List currencies
|
||||
-L, --list-rates <LIST_RATES> List exchange rate for currency
|
||||
-h, --help Print help
|
||||
|
||||
-k, --set-api-key <API_KEY> Set api key
|
||||
-r, --recreate-cache Recrate cache
|
||||
-i, --interactive Interactive mode
|
||||
-l, --list List currencies
|
||||
-L, --list-rates <currency> List exchange rate for currency
|
||||
-h, --help Print help
|
||||
```
|
||||
# Build
|
||||
Needs rust and cargo, build tested on rust v1.76.0\
|
||||
|
|
|
@ -17,10 +17,13 @@ mod requests;
|
|||
struct Cli
|
||||
{
|
||||
/// Currency code to exchange from
|
||||
#[arg(value_names = ["Currency input"])]
|
||||
currency_from: Option<String>,
|
||||
/// Currency code to exchange to
|
||||
#[arg(value_names = ["Currency target"])]
|
||||
currency_to: Option<String>,
|
||||
/// Currency amount to exchange
|
||||
#[arg(value_names = ["Amount"])]
|
||||
value: Option<String>,
|
||||
|
||||
/// Set api key
|
||||
|
@ -38,7 +41,7 @@ struct Cli
|
|||
list: bool,
|
||||
|
||||
/// List exchange rate for currency
|
||||
#[arg(short = 'L', long = "list-rates")]
|
||||
#[arg(short = 'L', long = "list-rates", value_names = ["currency"])]
|
||||
list_rates: Option<String>,
|
||||
}
|
||||
async fn setup_key(key: String) -> Result<bool, Box<dyn std::error::Error>>
|
||||
|
|
Reference in New Issue