mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
Merge pull request #4579 from piotrkwiecinski/nproc-move-string-to-md-file
nproc: move help strings to markdown file
This commit is contained in:
commit
c2f2301067
2 changed files with 12 additions and 5 deletions
9
src/uu/nproc/nproc.md
Normal file
9
src/uu/nproc/nproc.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# nproc
|
||||
|
||||
```
|
||||
nproc [OPTIONS]...
|
||||
```
|
||||
|
||||
Print the number of cores available to the current process.
|
||||
If the `OMP_NUM_THREADS` or `OMP_THREAD_LIMIT` environment variables are set, then
|
||||
they will determine the minimum and maximum returned value respectively.
|
|
@ -11,7 +11,7 @@ use clap::{crate_version, Arg, ArgAction, Command};
|
|||
use std::{env, thread};
|
||||
use uucore::display::Quotable;
|
||||
use uucore::error::{UResult, USimpleError};
|
||||
use uucore::format_usage;
|
||||
use uucore::{format_usage, help_about, help_usage};
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
pub const _SC_NPROCESSORS_CONF: libc::c_int = 83;
|
||||
|
@ -25,10 +25,8 @@ pub const _SC_NPROCESSORS_CONF: libc::c_int = 1001;
|
|||
static OPT_ALL: &str = "all";
|
||||
static OPT_IGNORE: &str = "ignore";
|
||||
|
||||
static ABOUT: &str = r#"Print the number of cores available to the current process.
|
||||
If the OMP_NUM_THREADS or OMP_THREAD_LIMIT environment variables are set, then
|
||||
they will determine the minimum and maximum returned value respectively."#;
|
||||
const USAGE: &str = "{} [OPTIONS]...";
|
||||
const ABOUT: &str = help_about!("nproc.md");
|
||||
const USAGE: &str = help_usage!("nproc.md");
|
||||
|
||||
#[uucore::main]
|
||||
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue