aboutsummaryrefslogtreecommitdiff
path: root/vendor/clap/examples/tutorial_builder/03_02_option.md
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/clap/examples/tutorial_builder/03_02_option.md')
-rw-r--r--vendor/clap/examples/tutorial_builder/03_02_option.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/vendor/clap/examples/tutorial_builder/03_02_option.md b/vendor/clap/examples/tutorial_builder/03_02_option.md
new file mode 100644
index 0000000..42b81fd
--- /dev/null
+++ b/vendor/clap/examples/tutorial_builder/03_02_option.md
@@ -0,0 +1,30 @@
+```console
+$ 03_02_option --help
+A simple to use, efficient, and full-featured Command Line Argument Parser
+
+Usage: 03_02_option[EXE] [OPTIONS]
+
+Options:
+ -n, --name <name>
+ -h, --help Print help
+ -V, --version Print version
+
+$ 03_02_option
+name: None
+
+$ 03_02_option --name bob
+name: Some("bob")
+
+$ 03_02_option --name=bob
+name: Some("bob")
+
+$ 03_02_option -n bob
+name: Some("bob")
+
+$ 03_02_option -n=bob
+name: Some("bob")
+
+$ 03_02_option -nbob
+name: Some("bob")
+
+```