Skip to content

Commit 2aafa61

Browse files
committed
date: add date source option conflicts
1 parent 9d86f5d commit 2aafa61

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/uu/date/src/date.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ pub fn uu_app() -> Command {
296296
.long(OPT_FILE)
297297
.value_name("DATEFILE")
298298
.value_hint(clap::ValueHint::FilePath)
299+
.conflicts_with(OPT_DATE)
299300
.help(translate!("date-help-file")),
300301
)
301302
.arg(
@@ -313,6 +314,7 @@ pub fn uu_app() -> Command {
313314
.arg(
314315
Arg::new(OPT_RESOLUTION)
315316
.long(OPT_RESOLUTION)
317+
.conflicts_with_all([OPT_DATE, OPT_FILE])
316318
.overrides_with(OPT_RESOLUTION)
317319
.help(translate!("date-help-resolution"))
318320
.action(ArgAction::SetTrue),
@@ -345,6 +347,7 @@ pub fn uu_app() -> Command {
345347
.long(OPT_REFERENCE)
346348
.value_name("FILE")
347349
.value_hint(clap::ValueHint::AnyPath)
350+
.conflicts_with_all([OPT_DATE, OPT_FILE, OPT_RESOLUTION])
348351
.help(translate!("date-help-reference")),
349352
)
350353
.arg(

0 commit comments

Comments
 (0)