mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
chgrp: move help strings to markdown file (#4461)
* chgrp: move help strings to markdown file Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
This commit is contained in:
parent
c386b27043
commit
f75c427b96
2 changed files with 13 additions and 6 deletions
10
src/uu/chgrp/chgrp.md
Normal file
10
src/uu/chgrp/chgrp.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!-- spell-checker:ignore (vars) RFILE -->
|
||||
|
||||
# chgrp
|
||||
|
||||
```
|
||||
chgrp [OPTION]... GROUP FILE...
|
||||
[OPTION]... --reference=RFILE FILE...
|
||||
```
|
||||
|
||||
Change the group of each FILE to GROUP.
|
|
@ -10,20 +10,17 @@
|
|||
use uucore::display::Quotable;
|
||||
pub use uucore::entries;
|
||||
use uucore::error::{FromIo, UResult, USimpleError};
|
||||
use uucore::format_usage;
|
||||
use uucore::perms::{chown_base, options, IfFrom};
|
||||
use uucore::{format_usage, help_about, help_usage};
|
||||
|
||||
use clap::{Arg, ArgAction, ArgMatches, Command};
|
||||
|
||||
use std::fs;
|
||||
use std::os::unix::fs::MetadataExt;
|
||||
|
||||
static ABOUT: &str = "Change the group of each FILE to GROUP.";
|
||||
static VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
const USAGE: &str = "\
|
||||
{} [OPTION]... GROUP FILE...\n \
|
||||
{} [OPTION]... --reference=RFILE FILE...";
|
||||
static ABOUT: &str = help_about!("chgrp.md");
|
||||
const USAGE: &str = help_usage!("chgrp.md");
|
||||
|
||||
fn parse_gid_and_uid(matches: &ArgMatches) -> UResult<(Option<u32>, Option<u32>, IfFrom)> {
|
||||
let dest_gid = if let Some(file) = matches.get_one::<String>(options::REFERENCE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue