From c3f2ac6f044e1d00cb440214c7ddb5d5bdeea505 Mon Sep 17 00:00:00 2001 From: yt2b Date: Tue, 20 Jun 2023 23:20:22 +0900 Subject: [PATCH] yes: add --version option --- src/uu/yes/src/yes.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/uu/yes/src/yes.rs b/src/uu/yes/src/yes.rs index fd5124064..72c19b872 100644 --- a/src/uu/yes/src/yes.rs +++ b/src/uu/yes/src/yes.rs @@ -9,7 +9,7 @@ // cSpell:ignore strs -use clap::{builder::ValueParser, Arg, ArgAction, Command}; +use clap::{builder::ValueParser, crate_version, Arg, ArgAction, Command}; use std::error::Error; use std::ffi::OsString; use std::io::{self, Write}; @@ -44,6 +44,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> { pub fn uu_app() -> Command { Command::new(uucore::util_name()) + .version(crate_version!()) .about(ABOUT) .override_usage(format_usage(USAGE)) .arg(