1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 11:07:44 +00:00

Merge pull request #4422 from chenchiii/ptx-move-help-strings-to-md-file

ptx: move help strings to markdown file
This commit is contained in:
Sylvestre Ledru 2023-03-06 08:15:50 +01:00 committed by GitHub
commit 6508149d63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 9 deletions

11
src/uu/ptx/ptx.md Normal file
View file

@ -0,0 +1,11 @@
# ptx
```
ptx [OPTION]... [INPUT]...
ptx -G [OPTION]... [INPUT [OUTPUT]]
```
Produce a permuted index of file contents
Output a permuted index, including context, of the words in the input files.
Mandatory arguments to long options are mandatory for short options too.
With no FILE, or when FILE is -, read standard input. Default is '-F /'.

View file

@ -19,16 +19,10 @@ use std::io::{stdin, stdout, BufRead, BufReader, BufWriter, Read, Write};
use std::num::ParseIntError; use std::num::ParseIntError;
use uucore::display::Quotable; use uucore::display::Quotable;
use uucore::error::{FromIo, UError, UResult}; use uucore::error::{FromIo, UError, UResult};
use uucore::format_usage; use uucore::{format_usage, help_about, help_usage};
const USAGE: &str = "\ const USAGE: &str = help_usage!("ptx.md");
{} [OPTION]... [INPUT]... const ABOUT: &str = help_about!("ptx.md");
{} -G [OPTION]... [INPUT [OUTPUT]]";
const ABOUT: &str = "\
Output a permuted index, including context, of the words in the input files. \n\n\
Mandatory arguments to long options are mandatory for short options too.\n\
With no FILE, or when FILE is -, read standard input. Default is '-F /'.";
const REGEX_CHARCLASS: &str = "^-]\\"; const REGEX_CHARCLASS: &str = "^-]\\";