diff --git a/src/uu/ptx/ptx.md b/src/uu/ptx/ptx.md new file mode 100644 index 000000000..b8717776c --- /dev/null +++ b/src/uu/ptx/ptx.md @@ -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 /'. \ No newline at end of file diff --git a/src/uu/ptx/src/ptx.rs b/src/uu/ptx/src/ptx.rs index 9716aaf30..4d411ed31 100644 --- a/src/uu/ptx/src/ptx.rs +++ b/src/uu/ptx/src/ptx.rs @@ -19,16 +19,10 @@ use std::io::{stdin, stdout, BufRead, BufReader, BufWriter, Read, Write}; use std::num::ParseIntError; use uucore::display::Quotable; use uucore::error::{FromIo, UError, UResult}; -use uucore::format_usage; +use uucore::{format_usage, help_about, help_usage}; -const USAGE: &str = "\ - {} [OPTION]... [INPUT]... - {} -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 USAGE: &str = help_usage!("ptx.md"); +const ABOUT: &str = help_about!("ptx.md"); const REGEX_CHARCLASS: &str = "^-]\\";