diff --git a/src/uu/uptime/src/uptime.rs b/src/uu/uptime/src/uptime.rs index 3a561f419..6f4e62084 100644 --- a/src/uu/uptime/src/uptime.rs +++ b/src/uu/uptime/src/uptime.rs @@ -11,17 +11,13 @@ use chrono::{Local, TimeZone, Utc}; use clap::{crate_version, Arg, ArgAction, Command}; -use uucore::format_usage; -// import crate time from utmpx -pub use uucore::libc; use uucore::libc::time_t; +use uucore::{format_usage, help_about, help_usage}; use uucore::error::{UResult, USimpleError}; -static ABOUT: &str = "Display the current time, the length of time the system has been up,\n\ - the number of users on the system, and the average number of jobs\n\ - in the run queue over the last 1, 5 and 15 minutes."; -const USAGE: &str = "{} [OPTION]..."; +const ABOUT: &str = help_about!("uptime.md"); +const USAGE: &str = help_usage!("uptime.md"); pub mod options { pub static SINCE: &str = "since"; } diff --git a/src/uu/uptime/uptime.md b/src/uu/uptime/uptime.md new file mode 100644 index 000000000..fd9c8fd2f --- /dev/null +++ b/src/uu/uptime/uptime.md @@ -0,0 +1,9 @@ +# uptime + +``` +uptime [OPTION]... +``` + +Display the current time, the length of time the system has been up, +the number of users on the system, and the average number of jobs +in the run queue over the last 1, 5 and 15 minutes.