-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from rust-clique/example
add example output
- Loading branch information
Showing
1 changed file
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,9 +19,9 @@ fn main() { | |
.about("A basic example") | ||
.author(Author::new("Alice Person").email("[email protected]")) | ||
.author(Author::new("Bob Human").email("[email protected]")) | ||
.flag(Flag::new().short("-d").long("--deubg").description("Enable debug mode")) | ||
.flag(Flag::new().short("-d").long("--debug").description("Enable debug mode")) | ||
.flag(Flag::new().short("-v").long("--verbose").description("Enable verbose mode")) | ||
.option(Opt::new("output").short("-o").long("--output").description("Output file")); | ||
.option(Opt::new("output").short("-o").long("--output").description("The file path to write output to")); | ||
|
||
let _string = page.render(); | ||
} | ||
|
@@ -30,6 +30,38 @@ Preview by running: | |
```sh | ||
$ cargo run > /tmp/app.man; man /tmp/app.man | ||
``` | ||
Which outputs: | ||
```txt | ||
BASIC(1) General Commands Manual BASIC(1) | ||
NAME | ||
basic - A basic example | ||
SYNOPSIS | ||
basic [FLAGS] [OPTIONS] | ||
FLAGS | ||
-d, --debug | ||
Enable debug mode. | ||
-v, --verbose | ||
Enable verbose mode | ||
OPTIONS | ||
-o, --output=output | ||
The file path to write output to. | ||
EXIT STATUS | ||
0 Successful program execution. | ||
1 Unsuccessful program execution. | ||
101 The program panicked. | ||
AUTHORS | ||
Alice Person <[email protected]> | ||
Bob Human <[email protected]> | ||
``` | ||
|
||
## Installation | ||
```sh | ||
|