Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 23 additions & 81 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ tempfile = "3.10.1"
terminal_size = "0.4.2"
textwrap = { version = "0.16.1", features = ["terminal_size"] }
thiserror = "2.0.4"
uucore = "0.2.2"
uucore = "0.5.0"
uutests = "0.5.0"
walkdir = "2.5.0"
windows = { version = "0.62.0" }
Expand Down
7 changes: 0 additions & 7 deletions src/uu/free/free.md

This file was deleted.

12 changes: 3 additions & 9 deletions src/uu/free/src/free.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@ use std::ops::Mul;
use std::process;
use std::thread::sleep;
use std::time::Duration;
use uucore::{
error::{UResult, USimpleError},
format_usage, help_about, help_usage,
};

const ABOUT: &str = help_about!("free.md");
const USAGE: &str = help_usage!("free.md");
use uucore::error::{UResult, USimpleError};

/// The unit of number is [UnitMultiplier::Bytes]
#[derive(Default, Clone)]
Expand Down Expand Up @@ -249,8 +243,8 @@ 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))
.about("Display amount of free and used memory in the system")
.override_usage("free [options]")
.args_override_self(true)
.infer_long_args(true)
.disable_help_flag(true)
Expand Down
7 changes: 0 additions & 7 deletions src/uu/pgrep/pgrep.md

This file was deleted.

9 changes: 3 additions & 6 deletions src/uu/pgrep/src/pgrep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ pub mod process;
pub mod process_matcher;

use clap::{arg, crate_version, Command};
use uucore::{error::UResult, format_usage, help_about, help_usage};

const ABOUT: &str = help_about!("pgrep.md");
const USAGE: &str = help_usage!("pgrep.md");
use uucore::error::UResult;

/// # Conceptual model of `pgrep`
///
Expand Down Expand Up @@ -74,8 +71,8 @@ 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))
.about("look up, signal, or wait for processes based on name and other attributes")
.override_usage("pgrep [options] <pattern>")
.args_override_self(true)
.args([
arg!(-d --delimiter <string> "specify output delimiter")
Expand Down
7 changes: 0 additions & 7 deletions src/uu/pidof/pidof.md

This file was deleted.

9 changes: 3 additions & 6 deletions src/uu/pidof/src/pidof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ use std::path::PathBuf;

use clap::{crate_version, Arg, ArgAction, ArgMatches, Command};
use uu_pgrep::process::{walk_process, ProcessInformation};
use uucore::error::UResult;
#[cfg(unix)]
use uucore::process::geteuid;
use uucore::{error::UResult, format_usage, help_about, help_usage};

const ABOUT: &str = help_about!("pidof.md");
const USAGE: &str = help_usage!("pidof.md");

#[uucore::main]
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
Expand Down Expand Up @@ -147,8 +144,8 @@ fn collect_matched_pids(matches: &ArgMatches) -> Vec<usize> {
pub fn uu_app() -> Command {
Command::new(uucore::util_name())
.version(crate_version!())
.about(ABOUT)
.override_usage(format_usage(USAGE))
.about("Find the process ID of a running program")
.override_usage("pidof [options] [program [...]]")
.infer_long_args(true)
.arg(
Arg::new("program-name")
Expand Down
7 changes: 0 additions & 7 deletions src/uu/pidwait/pidwait.md

This file was deleted.

Loading
Loading