Commit graph

2076 commits

Author SHA1 Message Date
Will Murphy
f4c3a21a8f Change tests to reduce duplication
This change lets us test multiple orderings of the global
argument and subcommand issue with less duplicated code.
2017-10-18 07:42:17 -04:00
Will Murphy
12a7310233 Replicate diesel's issue with failing nested subcommand 2017-10-18 07:42:17 -04:00
Will Murphy
6f3b454573 Add failing test for globals to subcommands
Issue 978 mentions that subcommands cannot see the value
of globals that get passed, even if ArgSettings::PropagateGlobalsDown
is true.

This change commits a failing test that reproduces this error.
2017-10-18 07:42:17 -04:00
Kevin K
caeb133bb5 Merge pull request #1067 from kbknapp/issue-1052
Issue 1052
2017-10-12 19:26:38 -04:00
Kevin K
3e645ae9fc
tests: adds tests for required delimiters appearing in the help and usage strings 2017-10-12 15:11:51 -07:00
Kevin K
dce616998e
imp: args that have require_delimiter(true) is now reflected in help and usage strings
Closes #1052
2017-10-12 15:11:24 -07:00
Kevin K
e36ca736ff Merge pull request #1065 from bluejekyll/add-env-help-str
always add env parameter when passed
2017-10-11 21:06:00 -04:00
Benjamin Fry
85f0fd1c87 always add env parameter when passed 2017-10-11 17:15:48 -07:00
Kevin K
797b6b3340 Merge pull request #1062 from kbknapp/bluejekyll-from_env
Bluejekyll from env
2017-10-07 20:03:27 -04:00
Kevin K
2acd9b23f5
Merge branch 'from_env' of https://github.com/bluejekyll/clap-rs into bluejekyll-from_env 2017-10-07 10:22:23 -07:00
Kevin K
609a1f27a1 Merge pull request #1058 from H2CO3/master
Reduce amount of unsafe code
2017-10-07 12:59:00 -04:00
Kevin K
ff5d726455 Merge pull request #1059 from H2CO3/textwrap
Reorganize optionally depending on term_width
2017-10-07 12:57:53 -04:00
Árpád Goretity
e1a4cfe3a3 Bump textwrap version as required 2017-10-06 13:53:08 +02:00
Árpád Goretity
ac97edde90 Reorganize optionally depending on term_width 2017-10-06 13:14:01 +02:00
Benjamin Fry
2fa8f835de put env: before default as that will be chosen first 2017-10-05 15:09:19 -07:00
Benjamin Fry
81cae1f620 add space in help output 2017-10-05 13:44:25 -07:00
Benjamin Fry
1401faa486 add validation tests 2017-10-05 11:36:50 -07:00
Árpád Goretity
a835c6112d Update Travis build spec to more recent version of rustc (just-pre-1.18 nightly and 1.18 stable) 2017-10-05 20:22:51 +02:00
Benjamin Fry
5fccd1fef8 add additional tests 2017-10-05 10:47:53 -07:00
Benjamin Fry
779560b5d5 fix some typos 2017-10-05 10:47:53 -07:00
Benjamin Fry
ec46b55fb3 add documentation and examples 2017-10-05 10:47:53 -07:00
Benjamin Fry
bad5d19edb add env key for help msg 2017-10-05 10:47:53 -07:00
Benjamin Fry
f254807c73 WIP: add from_env option 2017-10-05 10:46:55 -07:00
Árpád Goretity
11b60e4de2 Remove unnecessary static 2017-10-05 00:48:36 +02:00
Árpád Goretity
4cb8237e08 Clean up crate_authors macro 2017-10-05 00:09:18 +02:00
Árpád Goretity
cad2e64bdf Remove unnecessary unsafe {} blocks; remove an unnecessary allocation (String -> str for immediately-discarded debug message) 2017-10-04 22:38:45 +02:00
Kevin K
3224e2e1cd Merge pull request #1051 from malbarbo/master
make vec_map optional
2017-10-03 21:49:01 -04:00
Marco A L Barbosa
d7a9f324b9 Add vec_map feature to README.md 2017-10-02 15:56:55 -03:00
Kevin K
f28d7b4e84 Merge pull request #1053 from mgeisler/version-sync
Keep README version numbers in sync with crate version
2017-09-30 10:03:43 -07:00
Martin Geisler
e67a061bcf docs: add html_root_url attribute
This doc attribute is used by rustdoc when generating documentation
for other crates that depend on this crate. With the html_root_url,
rustdoc will be able to generate correct links into this crate.

See C-HTML-ROOT in the Rust API Guidelines for more information:
https://rust-lang-nursery.github.io/api-guidelines/documentation.html#crate-sets-html_root_url-attribute-c-html-root

A version-sync check was added to ensure that the URL is kept up to
date when the crate version changes.
2017-09-23 12:50:21 +02:00
Martin Geisler
e09c248fc1 tests: ensure README version numbers are in sync 2017-09-23 12:45:50 +02:00
Martin Geisler
5536361bcd docs: sync README version numbers with crate version 2017-09-23 12:32:49 +02:00
Marco A L Barbosa
7b2aacde08 make vec_map optional 2017-09-19 15:21:58 -03:00
Kevin K
6e948994a6 Merge pull request #1048 from kbknapp/issues-1046,1047
Issues 1046,1047
2017-09-15 11:09:20 -07:00
Kevin K
f093b4c1f8
chore: increase version 2017-09-14 10:39:24 -07:00
Kevin K
8567f0a46e
tests: adds tests to guard against subcommand section of help message showing unnecessarily 2017-09-14 10:38:01 -07:00
Kevin K
4ae7b04647
imp: if all subcommands are hidden, the subcommands section of the help message is no longer displayed
Closes #1046
2017-09-14 10:37:50 -07:00
Kevin K
e1319fa198
tests: adds tests to guard against options with default values and zero or more values 2017-09-14 10:37:45 -07:00
Kevin K
9c248cbf7d
fix: fixes a bug where default values are not applied if the option supports zero values
Closes #1047
2017-09-14 10:37:35 -07:00
Kevin K
326d0a52ce Merge pull request #1045 from kbknapp/issues-1043,1044
Issues 1043,1044
2017-09-14 07:36:57 -07:00
Kevin K
cbd813c1a0
chore: increase version 2017-09-13 20:55:00 -07:00
Kevin K
16cb88e751
tests: fixes tests that regressed 2017-09-13 20:50:21 -07:00
Kevin K
150a0433ce
tests: adds tests for using requires_equals and min_values together 2017-09-13 12:27:19 -07:00
Kevin K
10ae208f68
fix: fixes using require_equals(true) and min_values(0) together
Closes #1044
2017-09-13 12:26:52 -07:00
Kevin K
0136e991c4
tests: adds tests for App::long_about 2017-09-13 11:41:49 -07:00
Kevin K
a8257ea0ff
fix(Help Message): fixes long_about not being usable
Closes #1043
2017-09-13 11:41:25 -07:00
Kevin K
2094c28d15 Merge pull request #1039 from siiptuo/fix-completion-special-characters
Escape special characters in zsh and fish completions
2017-09-13 10:58:33 -07:00
Kevin K
e053d4ab0c Merge pull request #1040 from Fraser999/bugfix
fix: avoid panic generating default help msg if term width set to 0 due to issue in textwrap 0.7.0
2017-09-13 10:57:00 -07:00
Tuomas Siipola
87e019fc84
fix: escape special characters in zsh and fish completions 2017-09-12 18:27:29 +03:00
Fraser Hutchison
b3eadb0de5 fix: avoid panic generating default help msg if term width set to 0 due to bug in textwrap 0.7.0
upgrade textwrap to 0.8.0 and add regression test
2017-09-07 00:19:08 +01:00