-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: adds App::with_defaults to automatically use crate_authors! and crate_version! macros One can now use ```rust let a = App::with_defaults("My Program"); // same as let a2 = App::new("My Program") .version(crate_version!()) .author(crate_authors!()); ``` Closes #600 * imp(YAML Errors): vastly improves error messages when using YAML When errors are made while developing, the panic error messages have been improved instead of relying on the default panic message which is extremely unhelpful. Closes #574 * imp(Completions): uses standard conventions for bash completion files, namely '{bin}.bash-completion' Closes #567 * imp(Help): automatically moves help text to the next line and wraps when term width is determined to be too small, or help text is too long Now `clap` will check if it should automatically place long help messages on the next line after the flag/option. This is determined by checking to see if the space taken by flag/option plus spaces and values doesn't leave enough room for the entirety of the help message, with the single exception of of if the flag/option/spaces/values is less than 25% of the width. Closes #597 * tests: updates help tests to new forced new line rules * fix(Groups): fixes some usage strings that contain both args in groups and ones that conflict with each other Args that conflict *and* are in a group will now only display in the group and not in the usage string itself. Closes #616 * chore: updates dep graph Closes #633 * chore: clippy run * style: changes debug header to match other Rust projects * chore: increase version
- Loading branch information
Showing
16 changed files
with
298 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[package] | ||
|
||
name = "clap" | ||
version = "2.10.4" | ||
version = "2.11.0" | ||
authors = ["Kevin K. <[email protected]>"] | ||
exclude = ["examples/*", "clap-test/*", "tests/*", "benches/*", "*.png", "clap-perf/*", "*.dot"] | ||
repository = "https://github.com/kbknapp/clap-rs.git" | ||
|
@@ -21,7 +21,7 @@ libc = { version = "~0.2.9", optional = true } | |
ansi_term = { version = "~0.8.0", optional = true } | ||
strsim = { version = "~0.5.1", optional = true } | ||
yaml-rust = { version = "~0.3.2", optional = true } | ||
clippy = { version = "~0.0.79", optional = true } | ||
clippy = { version = "~0.0.85", optional = true } | ||
unicode-width = "~0.1.3" | ||
unicode-segmentation = "~0.1.2" | ||
term_size = { version = "~0.1.0", optional = true } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,41 @@ | ||
digraph dependencies { | ||
N0[label="clap"]; | ||
N1[label="ansi_term",style=dashed]; | ||
N1[label="ansi_term"]; | ||
N2[label="bitflags"]; | ||
N3[label="clippy",color=blue,style=dashed]; | ||
N4[label="libc",style=dashed]; | ||
N5[label="strsim",style=dashed]; | ||
N6[label="unicode-width",style=dashed]; | ||
N7[label="vec_map"]; | ||
N8[label="yaml-rust",style=dashed,color=red]; | ||
N10[label="aho-corasick",color=blue,style=dashed]; | ||
N11[label="memchr",color=blue,style=dashed]; | ||
N12[label="regex",color=blue,style=dashed]; | ||
N13[label="quine-mc_cluskey",color=blue,style=dashed]; | ||
N14[label="regex-syntax",color=blue,style=dashed]; | ||
N15[label="semver",color=blue,style=dashed]; | ||
N16[label="toml",color=blue,style=dashed]; | ||
N17[label="unicode-normalization",color=blue,style=dashed]; | ||
N18[label="kernel32-sys",color=blue,style=dashed]; | ||
N19[label="winapi",color=blue,style=dashed]; | ||
N20[label="winapi-build",color=blue,style=dashed]; | ||
N21[label="nom",color=blue,style=dashed]; | ||
N22[label="thread_local",color=blue,style=dashed]; | ||
N23[label="utf8-ranges",color=blue,style=dashed]; | ||
N24[label="rustc-serialize",color=blue,style=dashed]; | ||
N25[label="thread-id"color=blue,style=dashed]; | ||
N3[label="clippy",color=blue]; | ||
N4[label="strsim"]; | ||
N5[label="term_size"]; | ||
N6[label="unicode-segmentation"]; | ||
N7[label="unicode-width"]; | ||
N8[label="vec_map"]; | ||
N9[label="yaml-rust",color=red]; | ||
N10[label="clippy_lints",color=blue]; | ||
N11[label="matches",color=blue]; | ||
N12[label="quine-mc_cluskey",color=blue]; | ||
N13[label="regex-syntax",color=red]; | ||
N14[label="rustc-serialize",color=blue]; | ||
N15[label="semver",color=blue]; | ||
N16[label="toml",color=blue]; | ||
N17[label="unicode-normalization",color=blue]; | ||
N0 -> N1[label="",style=dashed]; | ||
N0 -> N2[label=""]; | ||
N0 -> N3[label="",style=dashed,color=blue]; | ||
N0 -> N4[label="",style=dashed]; | ||
N0 -> N5[label="",style=dashed]; | ||
N0 -> N6[label="",style=dashed]; | ||
N0 -> N6[label=""]; | ||
N0 -> N7[label=""]; | ||
N0 -> N8[label="",style=dashed,color=red]; | ||
N0 -> N12[label="",style=dashed,color=blue]; | ||
N3 -> N13[label="",style=dashed,color=blue]; | ||
N3 -> N14[label="",style=dashed,color=blue]; | ||
N3 -> N15[label="",style=dashed,color=blue]; | ||
N3 -> N16[label="",style=dashed,color=blue]; | ||
N3 -> N17[label="",style=dashed,color=blue]; | ||
N0 -> N8[label=""]; | ||
N0 -> N9[label="",style=dashed,color=red]; | ||
N3 -> N10[label="",style=dashed,color=blue]; | ||
N5 -> N3[label="",style=dashed,color=blue]; | ||
N9 -> N3[label="",style=dashed,color=blue]; | ||
N9 -> N13[label="",style=dashed,color=red]; | ||
N10 -> N11[label="",style=dashed,color=blue]; | ||
N11 -> N4[label="",style=dashed,color=blue]; | ||
N12 -> N10[label="",style=dashed,color=blue]; | ||
N12 -> N11[label="",style=dashed,color=blue]; | ||
N12 -> N14[label="",style=dashed,color=blue]; | ||
N12 -> N22[label="",style=dashed,color=blue]; | ||
N12 -> N23[label="",style=dashed,color=blue]; | ||
N15 -> N21[label="",style=dashed,color=blue]; | ||
N16 -> N24[label="",style=dashed,color=blue]; | ||
N18 -> N19[label="",style=dashed,color=blue]; | ||
N18 -> N20[label="",style=dashed,color=blue]; | ||
N22 -> N25[label="",style=dashed,color=blue]; | ||
N25 -> N4[label="",style=dashed,color=blue]; | ||
N25 -> N18[label="",style=dashed,color=blue]; | ||
N10 -> N12[label="",style=dashed,color=blue]; | ||
N10 -> N13[label="",style=dashed,color=blue]; | ||
N10 -> N14[label="",style=dashed,color=blue]; | ||
N10 -> N15[label="",style=dashed,color=blue]; | ||
N10 -> N16[label="",style=dashed,color=blue]; | ||
N10 -> N17[label="",style=dashed,color=blue]; | ||
N16 -> N14[label="",style=dashed,color=blue]; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: yml_app | ||
version: 1.0 | ||
version: "1.0" | ||
about: an example using a .yml file to build a CLI | ||
author: Kevin K. <[email protected]> | ||
|
||
|
@@ -69,7 +69,7 @@ subcommands: | |
# Rust code later | ||
- subcmd: | ||
about: demos subcommands from yaml | ||
version: 0.1 | ||
version: "0.1" | ||
author: Kevin K. <[email protected]> | ||
# Subcommand args are exactly like App args | ||
args: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.