uptime: move help strings to markdown file

This commit is contained in:
Miles Liu 2023-03-16 17:48:55 +08:00
parent f53df8ade5
commit 66fef28ec6
No known key found for this signature in database
GPG key ID: 4DB9B32F9B24A7A9
2 changed files with 12 additions and 5 deletions

View file

@ -11,17 +11,15 @@
use chrono::{Local, TimeZone, Utc};
use clap::{crate_version, Arg, ArgAction, Command};
use uucore::format_usage;
use uucore::{format_usage, help_about, help_usage};
// import crate time from utmpx
pub use uucore::libc;
use uucore::libc::time_t;
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";
}

9
src/uu/uptime/uptime.md Normal file
View file

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