mirror of
https://github.com/lsd-rs/lsd
synced 2024-12-14 14:12:31 +00:00
add date validation message
This commit is contained in:
parent
50cf660567
commit
e6ee773277
1 changed files with 5 additions and 2 deletions
|
@ -138,7 +138,7 @@ pub fn build() -> App<'static, 'static> {
|
|||
.default_value("date")
|
||||
.multiple(true)
|
||||
.number_of_values(1)
|
||||
.help("How to display date"),
|
||||
.help("How to display date [possible values: date, relative, +date-time-format]"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("timesort")
|
||||
|
@ -213,7 +213,10 @@ fn validate_date_argument(arg: String) -> Result<(), String> {
|
|||
} else if &arg == "relative" {
|
||||
Result::Ok(())
|
||||
} else {
|
||||
Result::Err("possible values: date, relative".to_owned())
|
||||
Result::Err(
|
||||
"possible values: date, relative, +date-time-format"
|
||||
.to_owned()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue