Skip to content

Commit

Permalink
Merge pull request #12 from rust-clique/example
Browse files Browse the repository at this point in the history
add example output
  • Loading branch information
Dylan-DPC authored Aug 6, 2018
2 parents 53a0367 + 16d8709 commit ede4e24
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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
Expand Down

0 comments on commit ede4e24

Please sign in to comment.