clap/tests/app.yml
Kevin K b7793a2f4d Issues rollup (#637)
* 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
2016-08-27 23:42:31 -04:00

95 lines
2.2 KiB
YAML

name: claptests
version: "1.0"
about: tests clap library
author: Kevin K. <kbknapp@gmail.com>
settings:
- ArgRequiredElseHelp
args:
- opt:
short: o
long: option
multiple: true
help: tests options
- positional:
help: tests positionals
index: 1
- positional2:
help: tests positionals with exclusions
index: 2
- flag:
short: f
long: flag
multiple: true
help: tests flags
global: true
- flag2:
short: F
help: tests flags with exclusions
conflicts_with:
- flag
requires:
- option2
- option2:
long: long-option-2
help: tests long options with exclusions
conflicts_with:
- option
requires:
- positional2
- option3:
short: O
long: Option
help: tests options with specific value sets
takes_value: true
possible_values:
- fast
- slow
- positional3:
index: 3
help: tests positionals with specific values
possible_values: [ vi, emacs ]
- multvals:
long: multvals
help: Tests mutliple values, not mult occs
value_names:
- one
- two
- multvalsmo:
long: multvalsmo
multiple: true
help: Tests mutliple values, not mult occs
value_names: [one, two]
- minvals2:
long: minvals2
multiple: true
help: Tests 2 min vals
min_values: 2
- maxvals3:
long: maxvals3
multiple: true
help: Tests 3 max vals
max_values: 3
arg_groups:
- test:
args:
- maxvals3
- minmals2
conflicts_with:
- option3
requires:
- multvals
subcommands:
- subcmd:
about: tests subcommands
version: "0.1"
author: Kevin K. <kbknapp@gmail.com>
args:
- scoption:
short: o
long: option
multiple: true
help: tests options
takes_value: true
- scpositional:
help: tests positionals
index: 1