Kevin K
0bcc712064
fix(Usage Parser): fixes a bug where literal single quotes weren't allowed in help strings
...
Closes #406
2016-01-31 07:12:07 -05:00
Homu
f50b8dbf98
Auto merge of #404 - Keats:fix-macro, r=Vinatorul
...
fix: clap_app! should be gated by unstable, not nightly feature
Should fix #402
2016-01-30 22:02:33 +09:00
Vincent Prouillet
0c8b84af61
fix: clap_app! should be gated by unstable, not nightly feature
2016-01-30 11:16:13 +00:00
Homu
3067a12cab
Auto merge of #403 - kbknapp:cargo-features, r=kbknapp
...
fix: fixes cargo features to NOT require nightly with unstable features
2016-01-30 19:42:38 +09:00
Kevin K
998b0dfce0
chore: increase version
2016-01-29 22:11:34 -05:00
Kevin K
280ada7b84
fix: fixes cargo features to NOT require nightly with unstable features
...
Closes #402
2016-01-29 22:11:34 -05:00
Homu
7b287d7335
Auto merge of #399 - kbknapp:rebase-v2, r=kbknapp
...
clap v2
Finally ready...
2016-01-29 23:41:55 +09:00
Kevin K
90542747ac
chore: fixes doc and style mistakes
2016-01-28 21:58:40 -05:00
Homu
0b2a8a296f
Auto merge of #397 - Geogi:bump-deps, r=kbknapp
...
chore: bump dependencies bitflags and yaml-rust to latest version
Bump `bitflags` from 0.3.3 to 0.4.0 and `yaml-rust` from 0.2.2 to 0.3.0.
All tests pass in current stable, beta and nightly (`1.8.0-nightly (38e23e8f7 2016-01-27)`).
2016-01-29 01:58:51 +09:00
Kevin K
bf8cd8f446
chore: increase version
2016-01-28 11:46:12 -05:00
Kevin K
d374fd4def
chore: adds new contributors
2016-01-28 11:46:12 -05:00
Kevin K
4d7c5675b9
chore: updates dep-graph
2016-01-28 11:46:12 -05:00
Kevin K
c28d24db3e
fix: fixes nightly build with new lints
2016-01-28 11:46:12 -05:00
Kevin K
d182049119
chore: fixes failing rustdoc
2016-01-28 11:46:12 -05:00
Kevin K
c13963a30d
chore: updates appveyor build file
2016-01-28 11:46:12 -05:00
Kevin K
a210f89b84
docs: updates examples for 2x release
...
Closes #394
2016-01-28 11:46:12 -05:00
Kevin K
518b89bd3d
fix: fixes Windows build for 2x release
...
Closes #392
2016-01-28 11:46:12 -05:00
Kevin K
f8692a0b3a
docs: updates examples for 2x release
...
Closes #394
2016-01-28 11:46:12 -05:00
Kevin K
2031682193
chore: updates additional files for 2x release
2016-01-28 11:46:12 -05:00
Kevin K
d2a78e3e21
docs: updates documentation for v2 release
2016-01-28 11:45:31 -05:00
Kevin K
5f0da1200b
docs(README.md): updates readme for v2 release
...
Closes #393
2016-01-28 11:45:31 -05:00
Kevin K
693aece2cb
fix: fixes yaml build for 2x base
2016-01-28 11:45:31 -05:00
Kevin K
4c37b26a84
tests: fixes some failing doc tests
2016-01-28 11:45:31 -05:00
Kevin K
e494672ffc
refactor: removes some unnecessary code checks
2016-01-28 11:45:31 -05:00
Kevin K
f1876388a7
docs: updating docs for 2x release
2016-01-28 11:45:31 -05:00
Kevin K
609c06e119
feat: adds support for external subcommands
...
External subcommands are now supported via the following:
```rust
extern crate clap;
use clap::{App, AppSettings};
fn main() {
// Assume there is a third party subcommand named myprog-subcmd
let m = App::new("myprog")
.setting(AppSettings::AllowExternalSubcommands)
.get_matches_from(vec![
"myprog", "subcmd", "--option", "value", "-fff", "--flag"
]);
// All trailing arguments will be stored under the subcommands sub-matches under a
// value of their runtime name (in this case "subcmd")
match m.subcommand() {
(external, Some(ext_m)) => {
let ext_args: Vec<&str> = ext_m.values_of(external).unwrap().collect();
assert_eq!(ext_args ,["--option", "value", "-fff", "--flag"]);
},
_ => unreachable!()
}
}
```
Closes #372
2016-01-28 11:45:31 -05:00
Kevin K
86f3e33975
refactor(macros): uses macros to implement Settings enums
2016-01-28 11:45:31 -05:00
Kevin K
26ecadd252
feat: adds support values with a leading hyphen
...
By using AppSettings::AllowLeadingHyphen values starting with a
leading hyphen (such as a negative number) are supported. This
setting should be used with caution as it silences certain
circumstances which would otherwise be an error (like forgetting
a value to an option argument).
Closes #385
2016-01-28 11:45:31 -05:00
Kevin K
474f27af43
tests: adds tests for values when delims have been turned off
2016-01-28 11:45:31 -05:00
Kevin K
35ad17a282
feat: adds support for turning off the value delimiter
...
Closes #352
2016-01-28 11:45:31 -05:00
Kevin K
7b0ff38fe7
tests: adds tests for different value delimiters
2016-01-28 11:45:31 -05:00
Kevin K
0871145245
feat: adds support changing the value delimiter
...
Closes #353
2016-01-28 11:45:31 -05:00
Kevin K
28041cdad9
tests: adds tests for comma separated values
2016-01-28 11:45:31 -05:00
Kevin K
c2e03a0a4e
feat: adds support for comma separated values
...
This commit adds support for values separated by commas such as
--option=val1,val2,val3. It also includes support for uses
without the equals and shorts (both with and without)
--option=val1,val2
--option val1,val2
-oval1,val2
-o=val1,val2
-o val1,val2
Closes #348
2016-01-28 11:45:31 -05:00
Kevin K
60a61ddde6
tests(Benches): fixes failing bench marks
2016-01-28 11:45:31 -05:00
Kevin K
4192e1acea
test(Yaml): fixes yaml tests
2016-01-28 11:45:31 -05:00
Kevin K
f17e150894
tests(Usage Parser): adds and fixes tests for usage parser
2016-01-28 11:45:31 -05:00
Kevin K
eb4de9215f
imp(From Usage): vastly improves the usage parser
...
Closes #350
2016-01-28 11:45:31 -05:00
Kevin K
8c5ab033e7
tests: fixes broken python tests for optional values
2016-01-28 11:45:31 -05:00
Kevin K
32dd302f97
tests: fixes tests for optional option values
2016-01-28 11:45:31 -05:00
Kevin K
95e8209712
feat: adds support with options with optional values
...
Closes #367
2016-01-28 11:45:31 -05:00
Kevin K
0eba835968
tests: updated python tests to v2 info
2016-01-28 11:45:31 -05:00
Kevin K
d707fa0fad
tests(v2): updating yaml tests to new v2 base
2016-01-28 11:45:31 -05:00
Kevin K
0410873d8d
chore: clippy run
2016-01-28 11:45:31 -05:00
Kevin K
bb52d2d194
chore: removes unneeded function
2016-01-28 11:45:31 -05:00
Kevin K
e874a0d5e0
feat(UTF-8): adds support for invalid utf8 in values
...
Closes #269
2016-01-28 11:45:31 -05:00
Kevin K
c3e96232c9
tests(v2): fixing more tests on the new v2 base
2016-01-28 11:45:31 -05:00
Kevin K
0031d78564
refactor(v2): improving macros for code dedup
2016-01-28 11:45:31 -05:00
Kevin K
7fc18e685f
test(v2): fixing tests to pass under new v2 changes
2016-01-28 11:45:31 -05:00
Kevin K
20de5c6e76
feat(v2): implementing the base of 2.x
...
This commit implements the base changes for clap 2.x
2016-01-28 11:45:31 -05:00