1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 04:27:45 +00:00

yes: add --version option

This commit is contained in:
yt2b 2023-06-20 23:20:22 +09:00
parent 66723e0961
commit c3f2ac6f04

View file

@ -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(