1 //! How to append a postscript to the help message generated.
2 //!
3 //! Running this example with --help prints this message:
4 //! -----------------------------------------------------
5 //! structopt 0.3.25
6 //! I am a program and I do things.
7 //!
8 //! Sometimes they even work.
9 //!
10 //! USAGE:
11 //! after_help [FLAGS]
12 //!
13 //! FLAGS:
14 //! -d
15 //! Release the dragon
16 //!
17 //! -h, --help
18 //! Prints help information
19 //!
20 //! -V, --version
21 //! Prints version information
22 //!
23 //!
24 //! Beware `-d`, dragons be here
25 //! -----------------------------------------------------
26
27 use structopt::StructOpt;
28
29 /// I am a program and I do things.
30 ///
31 /// Sometimes they even work.
32 #[derive(StructOpt, Debug)]
33 #[structopt(after_help = "Beware `-d`, dragons be here")]
34 struct Opt {
35 /// Release the dragon.
36 #[structopt(short)]
37 dragon: bool,
38 }
39
main()40 fn main() {
41 let opt = Opt::from_args();
42 println!("{:?}", opt);
43 }
44