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

Merge pull request #5949 from tertsdiepraam/command-descriptions

`seq`: fix about text not found
This commit is contained in:
Daniel Hofstetter 2024-02-06 14:34:09 +01:00 committed by GitHub
commit 4c187e29d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View file

@ -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.

View file

@ -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()
}
@ -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()
}