Skip to content

Commit 05476fc

Browse files
committed
docs(from_usage): explains new usage strings with multiple values
1 parent 3d58197 commit 05476fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/args/arg.rs

+4
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ impl<'n, 'l, 'h, 'g, 'p, 'r> Arg<'n, 'l, 'h, 'g, 'p, 'r> {
196196
/// 7. The index of a positional argument will be the next available index (you don't need to
197197
/// specify one) i.e. all arguments without a `short` or `long` will be treated as
198198
/// positional
199+
/// 8. If the value names are all the same, and their multiple ones (i.e `-o <val> <val>`)
200+
/// they are counted and used as the number of values. If they are different, they are used
201+
/// as the value names (i.e. `--opt <file> <mode>`). In this case, if no name was specified
202+
/// prior to the value names, the long is used as the name by which to access the argument.
199203
///
200204
/// # Example
201205
///

0 commit comments

Comments
 (0)