Skip to content

Commit

Permalink
free: use arg! macro for all args
Browse files Browse the repository at this point in the history
  • Loading branch information
cakebaker authored and sylvestre committed Jun 29, 2024
1 parent 3071056 commit 57835d7
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/uu/free/src/free.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// file that was distributed with this source code.

use bytesize::{ByteSize, GB, GIB, KIB, MB, MIB, PB, PIB, TB, TIB};
use clap::{arg, crate_version, Arg, ArgAction, ArgGroup, ArgMatches, Command};
use clap::{arg, crate_version, ArgAction, ArgGroup, ArgMatches, Command};
use std::env;
#[cfg(target_os = "linux")]
use std::fs;
Expand Down Expand Up @@ -321,20 +321,9 @@ pub fn uu_app() -> Command {
.value_name("N")
.value_parser(clap::value_parser!(u64)),
arg!(-L --line "show output on a single line").action(ArgAction::SetTrue),
arg!(-w --wide "wide output").action(ArgAction::SetTrue),
arg!( --help "display this help and exit").action(ArgAction::Help),
])
.arg(
Arg::new("wide")
.short('w')
.long("wide")
.help("wide output")
.action(ArgAction::SetTrue),
)
.arg(
Arg::new("help")
.long("help")
.action(ArgAction::Help)
.help("display this help and exit"),
)
}

#[cfg(target_os = "linux")]
Expand Down

0 comments on commit 57835d7

Please sign in to comment.