Commit graph

131 commits

Author SHA1 Message Date
Guillaume Pinot
be60de036b structopt reexport structopt_derive
As using structopt without structopt_derive is quite meaningless, reexport
structopt_derive, symplifying the usage.

Inspired by the failure crate.

fix #45
2018-02-03 16:55:43 +01:00
Guillaume P
9cb1eb7137
Update CHANGELOG.md 2018-02-03 16:53:31 +01:00
Guillaume Pinot
7975343a03 Support 1-uple enum variant as subcommand
This is a breaking change as it modifies the StructOpt trait.

fix #38
2018-02-03 15:32:55 +01:00
Guillaume P
672438a744
Update CHANGELOG.md for #48 2018-02-03 15:31:51 +01:00
Sergio Benitez
35423c96c4 Add 'parse(from_occurrences)' parser. Don't special case 'u64'. (#48) 2018-02-03 15:15:03 +01:00
Guillaume P
76821ba7b2
Create CHANGELOG.md
fix #52
2018-01-31 23:14:33 +01:00
Sune Kirkeby
00a1e13fea Allow opting out of clap default features. (#46) 2018-01-23 15:47:06 +01:00
Xavier Bestel
cc6dfd2e54 Add doc on colored help (#40)
Added a note about `clap::App`'s _raw methods, and an example specifically about colored help text.
2017-12-05 15:20:17 +01:00
Guillaume Pinot
374f9080a8 v0.1.6 2017-11-25 23:45:02 +01:00
Guillaume Pinot
3186513b57 Improve doc about positional arguments
fix #33
2017-11-25 23:38:37 +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
dca4b8daab Improve documentation.
Fix #30
2017-11-23 16:03:50 +01:00
Guillaume Pinot
1173955d37 v0.1.5 2017-11-14 15:19:33 +01:00
Guillaume Pinot
227d1fa73c fix bug with optional subsubcommand and Enum 2017-11-14 15:18:13 +01:00
Guillaume Pinot
f24fcb19a8 v0.1.4 2017-11-09 10:24:18 +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
43710cf969 update to 0.1.3 2017-11-01 22:35:27 +01:00
Guillaume Pinot
d1170466df fix #9 2017-11-01 22:32:32 +01:00
Guillaume Pinot
29a642b10d fix #12 2017-11-01 22:31:33 +01:00
Guillaume Pinot
5ba275680b new release 2017-11-01 22:13:20 +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
Guillaume Pinot
f7a4be13ca update to 0.1.1 2017-11-01 21:17:40 +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
Pascal Hertleif
89f0078a0f Format multiple authors
Cargo's `CARGO_PKG_AUTHORS` env var separates author names with a colon,
which is not very pretty to look at. So, let's replace it with a comma.

Clap has the same functionality it its `crate_authors!` macro but as
it's only a few lines of code I didn't want to call that.
2017-09-22 22:09:49 +02:00
Pascal Hertleif
b4494747c7 Remove some trailing spaces 2017-09-22 22:09:49 +02:00
Tshepang Lekhonkhobe
7c60c62ac5 doc: improve explanation of "subcommands" 2017-07-19 23:53:56 +02:00
William Yao
a7224b5255 move assert 2017-07-17 11:45:31 +02:00
William Yao
443cc3e145 move augment_clap into inherent impl 2017-07-17 11:45:31 +02:00
William Yao
f6bd33d5de update structopt-derive documentation to reflect unit subcommands change 2017-07-17 11:45:31 +02: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
3772285091 add extra Arg methods in doc so examples still work 2017-07-17 11:45:31 +02:00
William Yao
e05c792f65 fix typoes 2017-07-17 11:45:31 +02:00
William Yao
c3815cdd81 remove unnecessary Option in documentation [ci skip] 2017-07-17 11:45:31 +02:00
William Yao
746f8e6a34 bump versions to 0.1.0 2017-07-17 11:45:31 +02:00
William Yao
5be4fb38e4 bump versions of structopt in README, fix typo 2017-07-17 11:45:31 +02:00
William Yao
6f385b4adb add missing backticks (oops) 2017-07-17 11:45:31 +02:00
William Yao
593f042c77 bump versions of structopt and structopt-derive 2017-07-17 11:45:31 +02:00
William Yao
a21a01acb2 add note about using doc comments for help messages (texitoi/structopt#1) 2017-07-17 11:45:31 +02:00
William Yao
12e88e1ea8 note about optional subcommands 2017-07-17 11:45:31 +02:00
William Yao
a8e466c7bb add documentation in structopt-derive about how to use subcommands 2017-07-17 11:45:31 +02:00
William Yao
f68a35c3a1 preliminary editing of structopt-derive documentation 2017-07-17 11:45:31 +02:00
William Yao
f9fc923993 add link to structopt-derive documentation from structopt crate 2017-07-17 11:45:31 +02:00
William Yao
a20a9e7be0 fix hyphenated 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
91e2d28e81 allow for optional subcommands (texitoi/structopt#1) 2017-07-17 11:45:31 +02:00
William Yao
baa96165f1 ignore unused matches for empty subcommands (texitoi/structopt#1) 2017-07-17 11:45:31 +02:00
William Yao
c010cf0266 add ability to put in 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