From bc08ef3e185393073d969d301989b6319c616c1f Mon Sep 17 00:00:00 2001 From: Kevin K Date: Wed, 5 Apr 2017 00:47:19 -0400 Subject: [PATCH] docs(clap_app!): documents the `--("some-arg")` method for using args with hyphens inside them Closes #919 --- src/macros.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/macros.rs b/src/macros.rs index 6fc7763a..05254207 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -562,6 +562,8 @@ macro_rules! app_from_crate { /// /// * A single hyphen followed by a character (such as `-c`) sets the [`Arg::short`] /// * A double hyphen followed by a character or word (such as `--config`) sets [`Arg::long`] +/// * If one wishes to use a [`Arg::long`] with a hyphen inside (i.e. `--config-file`), you +/// must use `--("config-file")` due to limitations of the Rust macro system. /// * Three dots (`...`) sets [`Arg::multiple(true)`] /// * Angled brackets after either a short or long will set [`Arg::value_name`] and /// `Arg::required(true)` such as `--config ` = `Arg::value_name("FILE")` and