Kevin K
7788ef70d9
wip: continuing to iron out the bugs from the internal refactor
2018-01-25 22:36:20 -05:00
Kevin K
712333be98
tests: splits tests into single duties
2018-01-25 15:08:57 -05:00
Kevin K
7673dfc085
perf: refactors the POSIX override handling to lazy handling
...
This commit primarily changes to a lazy handling of POSIX overrides by
relying on github.com/bluss/ordermap instead of the old HashMap impl.
The ordermap allows us to keep track of which arguments arrived first,
and therefore determine which ones should be removed when an override
conflict is found.
This has the added benefit of we no longer have to do the bookkeeping to
keep track and override args as they come in, we can do it once at the
end.
Finally, ordermap allows fast Vec like iteration of the keys, which we
end up doing several times. Benching is still TBD once the v3 prep is
done, but this change should have a meaningful impact.
2018-01-25 15:08:57 -05:00
Kevin K
e890b647f3
wip: still setting the stage for v3
2018-01-25 12:29:36 -05:00
Kevin K
1ab10275e4
style: rustfmt run
2018-01-25 12:21:17 -05:00
Kevin K
f66e4f3266
chore: removes no longer used style lints
2018-01-25 12:20:58 -05:00
Kevin K
efb3b28ae8
tests: updates the tests that were using clap internals
2018-01-25 12:20:56 -05:00
Kevin K
6705195449
wip: setting the stage for serde, custom derive, and v3
2018-01-25 12:20:04 -05:00
Kevin K
8173d717b1
chore: adds some just recipies for showing errors and tracking todos
2018-01-25 12:20:03 -05:00
Kevin K
4f3231a51c
fix(Help): fixes an issue where help is not properly written using App::write_help
...
Contains a *MINOR* breaking change. App::write_help now requires `&mut self` instead of `&self`.
This fixes a major bug where the help message is entirely incorrect.
More can be found at https://github.com/kbknapp/clap-rs/issues/808
I've decided to make this change because it was preventing further progress.
Anyone's code who breaks the fix is trivial:
```rust
// OLD BROKEN
let app = App::new("broken");
let mut out = io::stdout();
app.write_help(&mut out).expect("failed to write to stdout");
// NEW FIX
let mut app = App::new("broken"); // <-- let mut
let mut out = io::stdout();
app.write_help(&mut out).expect("failed to write to stdout");
```
Closes #808
2018-01-24 11:34:14 -05:00
Kevin K
acdbd47152
wip: changes to builders in prep for v3
2018-01-24 11:34:14 -05:00
Sune Kirkeby
00a1e13fea
Allow opting out of clap default features. ( #46 )
2018-01-23 15:47:06 +01:00
Kevin K
969c3adb41
Merge pull request #1136 from willmurphyscode/issue-1135
...
Test for Issue 1135
2018-01-22 14:08:50 -05:00
Kevin K
f27d35daa8
Merge pull request #1153 from ignatenkobrain/strsim-0.7
...
deps: update strsim to 0.7
2018-01-22 14:08:16 -05:00
Kevin K
d03d13399f
Merge branch 'master' into issue-1135
2018-01-20 15:27:58 -05:00
Kevin K
2a933d1291
Merge branch 'master' into strsim-0.7
2018-01-20 15:26:52 -05:00
Kevin K
95041ff10f
Merge pull request #1151 from discosultan/patch-1
...
Fix typos
2018-01-20 15:26:13 -05:00
Igor Gnatenko
836e98084c
deps: update strsim to 0.7
...
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2018-01-19 09:39:49 +01:00
Will Murphy
4896e817be
clean up comments
2018-01-18 20:45:31 -05:00
Will Murphy
c759d2027b
clean up comments in tests; add error case test
2018-01-18 20:41:23 -05:00
Will Murphy
74976a0df9
Implement required_unless for flag
...
Flags were incorrectly reporting that they never had required_unless args.
2018-01-18 20:34:22 -05:00
Will Murphy
c6c9d9b33f
Merge branch 'master' into issue-1135
2018-01-18 20:32:44 -05:00
Kevin K
6e66eac2ff
Merge branch 'master' into patch-1
2018-01-18 15:07:17 -05:00
Kevin K
f85fd9fbc8
Merge pull request #1152 from kbknapp/html_doc_root
...
chore: fix html_doc_root
2018-01-18 15:07:04 -05:00
Kevin K
5bb926ebf9
chore: fix html_doc_root
2018-01-18 15:06:23 -05:00
discosultan
61cf3f9142
Fix typo in arg.rs
2018-01-18 15:46:20 +01:00
discosultan
67e937acf7
Fix typo in 07_option_args.rs
2018-01-18 14:21:02 +01:00
discosultan
8aa3c57351
Fix typo in 07_option_args.rs
2018-01-18 14:16:15 +01:00
Jaanus Varus
354cefd274
Fix typos in 03_args.rs
2018-01-18 13:20:02 +01:00
Kevin K
b6f36f55a0
Merge pull request #1150 from kbknapp/v2.29.2
...
chore: increase version
2018-01-16 15:03:01 -05:00
Kevin K
df996822c8
chore: increase version
2018-01-16 15:01:53 -05:00
Kevin K
04d97c4cc7
Merge pull request #1149 from discosultan/patch-1
...
Fix doc typo in 14_groups.rs
2018-01-16 14:56:45 -05:00
Kevin K
288a777eca
Merge branch 'master' into patch-1
2018-01-16 14:56:34 -05:00
Kevin K
cfb94706d1
Merge pull request #1147 from segevfiner/zsh-completion-improvements
...
Zsh completion improvements
2018-01-16 14:56:14 -05:00
Jaanus Varus
eb9269a23b
Fix doc typo in 14_groups.rs
2018-01-16 19:54:14 +01:00
Kevin K
fc8cf97b94
Merge branch 'master' into zsh-completion-improvements
2018-01-16 00:23:34 -05:00
Kevin K
ff22cd98ba
Merge pull request #1148 from kbknapp/add-messense
...
chore(SPONSORS.md): adds the latest sponsor! Yay
2018-01-15 23:31:09 -05:00
Kevin K
0abcb80694
chore(SPONSORS.md): adds the latest sponsor! Yay
2018-01-15 23:29:55 -05:00
Segev Finer
25561decf1
feat(completions/zsh.rs): Escape possible values for options
2018-01-16 01:55:48 +02:00
Segev Finer
2cbbfa8ce9
style(completions/zsh.rs): Cleanup documentation and naming
2018-01-16 01:52:44 +02:00
Segev Finer
f3b0afd2be
feat(completions/zsh.rs): Implement postional argument possible values completion
2018-01-16 01:52:44 +02:00
Segev Finer
a652260795
fix(completions/zsh.rs): Add missing autoload for is-at-least
2018-01-15 20:41:08 +02:00
Kevin K
e077e0c930
Merge branch 'master' into zsh-completion-improvements
2018-01-15 11:53:25 -05:00
Kevin K
e078a5893b
Merge pull request #1146 from kraai/patch-2
...
fix: Fix typos
2018-01-15 11:53:08 -05:00
Kevin K
4fec24a6ac
Merge branch 'master' into patch-2
2018-01-15 11:52:53 -05:00
Kevin K
55ea76cd99
Merge pull request #1145 from kraai/patch-1
...
Fix typo
2018-01-15 11:52:26 -05:00
Kevin K
a46ff132f1
Merge branch 'master' into patch-1
2018-01-15 11:52:21 -05:00
Kevin K
d548e546ef
Merge pull request #1144 from segevfiner/zsh-redundant-code
...
fix(completions/zsh.zsh): Remove redundant code from output
2018-01-15 11:51:55 -05:00
Segev Finer
16b4f143ff
fix(completions/zsh.rs): Don't pass -S to _arguments if Zsh is too old
...
If you do pass it than _arguments considers -C as a possible option in
the completions.
2018-01-14 07:13:27 +02:00
Segev Finer
1146f0da15
fix(completions/zsh.rs): Maybe fix completions with mixed positionals and subcommands
...
Optional positionals mixed with subcommands will still break this, since
I can't see how to tell which element of $line is the command than.
Mixing optional positionals with subcommands is a bit weird and awkward
though...
2018-01-14 07:13:23 +02:00