Skip to content

Commit

Permalink
Merge pull request #5949 from tertsdiepraam/command-descriptions
Browse files Browse the repository at this point in the history
`seq`: fix about text not found
  • Loading branch information
cakebaker committed Feb 6, 2024
2 parents c638ea9 + 0b89a73 commit 4c187e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uu/seq/seq.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# seq

Display numbers from FIRST to LAST, in steps of INCREMENT.

```
seq [OPTION]... LAST
seq [OPTION]... FIRST LAST
seq [OPTION]... FIRST INCREMENT LAST
```

Display numbers from FIRST to LAST, in steps of INCREMENT.
6 changes: 6 additions & 0 deletions src/uucore_procs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ pub fn help_about(input: TokenStream) -> TokenStream {
let input: Vec<TokenTree> = input.into_iter().collect();
let filename = get_argument(&input, 0, "filename");
let text: String = uuhelp_parser::parse_about(&read_help(&filename));
if text.is_empty() {
panic!("About text not found! Make sure the markdown format is correct");
}
TokenTree::Literal(Literal::string(&text)).into()
}

Expand All @@ -77,6 +80,9 @@ pub fn help_usage(input: TokenStream) -> TokenStream {
let input: Vec<TokenTree> = input.into_iter().collect();
let filename = get_argument(&input, 0, "filename");
let text: String = uuhelp_parser::parse_usage(&read_help(&filename));
if text.is_empty() {
panic!("Usage text not found! Make sure the markdown format is correct");
}
TokenTree::Literal(Literal::string(&text)).into()
}

Expand Down

0 comments on commit 4c187e2

Please sign in to comment.