mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
chcon: move help strings to a markdown file (#4437)
* arch: move help strings to a markdown file #4368 --------- Co-authored-by: zleyyij <zleyyi@users.noreply.github.com> Co-authored-by: Sylvestre Ledru <sledru@mozilla.com> Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
This commit is contained in:
parent
932cf58755
commit
9fb6477c89
2 changed files with 15 additions and 10 deletions
11
src/uu/chcon/chcon.md
Normal file
11
src/uu/chcon/chcon.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!-- spell-checker:ignore (vars) RFILE -->
|
||||||
|
# chcon
|
||||||
|
|
||||||
|
```
|
||||||
|
chcon [OPTION]... CONTEXT FILE...
|
||||||
|
chcon [OPTION]... [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE...
|
||||||
|
chcon [OPTION]... --reference=RFILE FILE...
|
||||||
|
```
|
||||||
|
|
||||||
|
Change the SELinux security context of each FILE to CONTEXT.
|
||||||
|
With --reference, change the security context of each FILE to that of RFILE.
|
|
@ -1,11 +1,9 @@
|
||||||
// spell-checker:ignore (vars) RFILE
|
// spell-checker:ignore (vars) RFILE
|
||||||
|
|
||||||
#![allow(clippy::upper_case_acronyms)]
|
#![allow(clippy::upper_case_acronyms)]
|
||||||
|
|
||||||
use clap::builder::ValueParser;
|
use clap::builder::ValueParser;
|
||||||
use uucore::error::{UResult, USimpleError, UUsageError};
|
use uucore::error::{UResult, USimpleError, UUsageError};
|
||||||
use uucore::format_usage;
|
use uucore::{display::Quotable, format_usage, help_about, help_usage, show_error, show_warning};
|
||||||
use uucore::{display::Quotable, show_error, show_warning};
|
|
||||||
|
|
||||||
use clap::{Arg, ArgAction, Command};
|
use clap::{Arg, ArgAction, Command};
|
||||||
use selinux::{OpaqueSecurityContext, SecurityContext};
|
use selinux::{OpaqueSecurityContext, SecurityContext};
|
||||||
|
@ -21,13 +19,9 @@ mod fts;
|
||||||
|
|
||||||
use errors::*;
|
use errors::*;
|
||||||
|
|
||||||
static VERSION: &str = env!("CARGO_PKG_VERSION");
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
static ABOUT: &str = "Change the SELinux security context of each FILE to CONTEXT. \n\
|
const ABOUT: &str = help_about!("chcon.md");
|
||||||
With --reference, change the security context of each FILE to that of RFILE.";
|
const USAGE: &str = help_usage!("chcon.md");
|
||||||
const USAGE: &str = "\
|
|
||||||
{} [OPTION]... CONTEXT FILE... \n \
|
|
||||||
{} [OPTION]... [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE... \n \
|
|
||||||
{} [OPTION]... --reference=RFILE FILE...";
|
|
||||||
|
|
||||||
pub mod options {
|
pub mod options {
|
||||||
pub static HELP: &str = "help";
|
pub static HELP: &str = "help";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue