Skip to content

Commit

Permalink
Merge pull request #4589 from piotrkwiecinski/more-move-string-to-md-…
Browse files Browse the repository at this point in the history
…file

more: move help strings to markdown file
  • Loading branch information
cakebaker committed Mar 24, 2023
2 parents e03ed21 + d4758ff commit cc77a95
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/uu/more/more.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# more

```
more [OPTIONS] <FILE>...
```

Display the contents of a text file

6 changes: 5 additions & 1 deletion src/uu/more/src/more.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ use unicode_segmentation::UnicodeSegmentation;
use unicode_width::UnicodeWidthStr;
use uucore::display::Quotable;
use uucore::error::{UResult, USimpleError, UUsageError};
use uucore::{format_usage, help_about, help_usage};

const ABOUT: &str = help_about!("more.md");
const USAGE: &str = help_usage!("more.md");
const BELL: &str = "\x07";

pub mod options {
Expand Down Expand Up @@ -97,7 +100,8 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {

pub fn uu_app() -> Command {
Command::new(uucore::util_name())
.about("A file perusal filter for CRT viewing.")
.about(ABOUT)
.override_usage(format_usage(USAGE))
.version(crate_version!())
.infer_long_args(true)
.arg(
Expand Down

0 comments on commit cc77a95

Please sign in to comment.