Commit graph

13 commits

Author SHA1 Message Date
Sergio Benitez
35423c96c4 Add 'parse(from_occurrences)' parser. Don't special case 'u64'. (#48) 2018-02-03 15:15:03 +01:00
Guillaume Pinot
5bf0d2ffb5 Don't call author, version and about if empty argument
fix #31
2017-11-25 23:36:05 +01:00
Guillaume Pinot
227d1fa73c fix bug with optional subsubcommand and Enum 2017-11-14 15:18:13 +01:00
kennytm
13fc4fb66a Implement custom string parser from either &str or &OsStr. (#28)
* Implement custom string parser from either &str or &OsStr.

Fix #2.
Fix #3.

* Addressed review comments.
2017-11-09 10:23:02 +01:00
Guillaume Pinot
96a726aeb7 Handle multiline doc comment as help message
fix #25
2017-11-01 22:13:20 +01:00
Guillaume Pinot
4880ccb025 Fix a privacy bug
Fix #24
2017-11-01 22:13:20 +01:00
Seebi
ebde32aa5b Add raw attributes (#26)
* Add raw attributes

This makes it possible to call clap functions that don't take strings,
but any arbitrary value. Even functions that take more than one argument
can be called.

All attributes that are called `attribute_name_raw` are augmented to
`attribute_name(value)` without quoting `value`.

* Add tests for raw attributes and fix spelling
2017-11-01 08:41:58 +01:00
William Yao
810831cfe1 add support for unit-variant subcommands 2017-07-17 11:45:31 +02:00
William Yao
91fb4a40e4 allow for documentation to be placed on subcommands 2017-07-17 11:45:31 +02:00
William Yao
b295234d5d add test suite for nested subcommands (texitoi/structopt#1) 2017-07-17 11:45:31 +02:00
William Yao
e00e263f23 add test for subcommand parsing (texitoi/structopt#1) 2017-07-17 11:45:31 +02:00
Pascal Hertleif
2075ee8328 Favor help argument over doc comments
This changes the behavior of `from_attr_or_env` (used for clap
application settings) to favor the last occurrence of the requested
attribute. This is what repeatedly calling the same methods to set field
properties does implicitly.
2017-06-16 12:31:37 +02:00
Guillaume Pinot
fdc18d07bb add flag tests 2017-02-07 01:41:16 +01:00