bpaf 0.4.3

A simple Command Line Argument Parser with parser combinators
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! How to append a prefix or suffix to the help message generated.
//!
//! You can also override usage line if you don't like the generated one
use bpaf::*;

fn main() {
    let dragon = short('d').help("Release the dragon").switch();
    let info = Info::default()
        .descr("I am a program and I do things")
        .header("Sometimes they even work.")
        .footer("Beware `-d`, dragons be here");

    let opt = info.for_parser(dragon).run();
    println!("{:?}", opt);
}