Merge pull request #4547 from papparapa/mktemp-move-help-strings-to-md-file

mktemp: move help strings to markdown file
This commit is contained in:
Sylvestre Ledru 2023-03-19 09:01:35 +01:00 committed by GitHub
commit 257587accf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

7
src/uu/mktemp/mktemp.md Normal file
View file

@ -0,0 +1,7 @@
# mktemp
```
mktemp [OPTION]... [TEMPLATE]
```
Create a temporary file or directory.

View file

@ -11,7 +11,7 @@
use clap::{crate_version, Arg, ArgAction, ArgMatches, Command}; use clap::{crate_version, Arg, ArgAction, ArgMatches, Command};
use uucore::display::{println_verbatim, Quotable}; use uucore::display::{println_verbatim, Quotable};
use uucore::error::{FromIo, UError, UResult, UUsageError}; use uucore::error::{FromIo, UError, UResult, UUsageError};
use uucore::format_usage; use uucore::{format_usage, help_about, help_usage};
use std::env; use std::env;
use std::error::Error; use std::error::Error;
@ -28,8 +28,8 @@ use std::os::unix::prelude::PermissionsExt;
use rand::Rng; use rand::Rng;
use tempfile::Builder; use tempfile::Builder;
static ABOUT: &str = "Create a temporary file or directory."; const ABOUT: &str = help_about!("mktemp.md");
const USAGE: &str = "{} [OPTION]... [TEMPLATE]"; const USAGE: &str = help_usage!("mktemp.md");
static DEFAULT_TEMPLATE: &str = "tmp.XXXXXXXXXX"; static DEFAULT_TEMPLATE: &str = "tmp.XXXXXXXXXX";