mirror of
https://github.com/uutils/coreutils.git
synced 2026-05-06 07:26:38 -04:00
Merge pull request #4450 from papparapa/chown-move-help-strings-to-md-file
chown: move help strings to markdown file
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
<!-- spell-checker:ignore RFILE -->
|
||||||
|
# chown
|
||||||
|
|
||||||
|
```
|
||||||
|
chown [OPTION]... [OWNER][:[GROUP]] FILE...
|
||||||
|
chown [OPTION]... --reference=RFILE FILE...
|
||||||
|
```
|
||||||
|
|
||||||
|
Change file owner and group
|
||||||
@@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
use uucore::display::Quotable;
|
use uucore::display::Quotable;
|
||||||
pub use uucore::entries::{self, Group, Locate, Passwd};
|
pub use uucore::entries::{self, Group, Locate, Passwd};
|
||||||
use uucore::format_usage;
|
|
||||||
use uucore::perms::{chown_base, options, IfFrom};
|
use uucore::perms::{chown_base, options, IfFrom};
|
||||||
|
use uucore::{format_usage, help_about, help_usage};
|
||||||
|
|
||||||
use uucore::error::{FromIo, UResult, USimpleError};
|
use uucore::error::{FromIo, UResult, USimpleError};
|
||||||
|
|
||||||
@@ -19,11 +19,9 @@ use clap::{crate_version, Arg, ArgAction, ArgMatches, Command};
|
|||||||
use std::fs;
|
use std::fs;
|
||||||
use std::os::unix::fs::MetadataExt;
|
use std::os::unix::fs::MetadataExt;
|
||||||
|
|
||||||
static ABOUT: &str = "Change file owner and group";
|
static ABOUT: &str = help_about!("chown.md");
|
||||||
|
|
||||||
const USAGE: &str = "\
|
const USAGE: &str = help_usage!("chown.md");
|
||||||
{} [OPTION]... [OWNER][:[GROUP]] FILE...
|
|
||||||
{} [OPTION]... --reference=RFILE FILE...";
|
|
||||||
|
|
||||||
fn parse_gid_uid_and_filter(matches: &ArgMatches) -> UResult<(Option<u32>, Option<u32>, IfFrom)> {
|
fn parse_gid_uid_and_filter(matches: &ArgMatches) -> UResult<(Option<u32>, Option<u32>, IfFrom)> {
|
||||||
let filter = if let Some(spec) = matches.get_one::<String>(options::FROM) {
|
let filter = if let Some(spec) = matches.get_one::<String>(options::FROM) {
|
||||||
|
|||||||
Reference in New Issue
Block a user