clap/tests/fixtures/app.yaml

169 lines
4.3 KiB
YAML
Raw Normal View History

name: claptests
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-28 03:42:31 +00:00
version: "1.0"
about: tests clap library
author: Kevin K. <kbknapp@gmail.com>
2015-10-01 01:45:35 +00:00
settings:
- ArgRequiredElseHelp
ignored_field: This field is ignored
args:
2019-06-19 22:49:09 +00:00
- help:
short: h
long: help
2020-04-27 14:49:26 +00:00
about: prints help with a nonstandard description
ignored_field: This field is ignored
2020-04-09 16:19:05 +00:00
- option:
short: o
long: option
2021-02-24 15:07:57 +00:00
takes_value: true
multiple: true
2020-04-27 14:49:26 +00:00
about: tests options
- positional:
2020-04-27 14:49:26 +00:00
about: tests positionals
index: 1
- positional2:
2020-04-27 14:49:26 +00:00
about: tests positionals with exclusions
index: 2
default_value_if:
- [flag, null, some]
- [positional, other, something]
- flag:
short: f
long: flag
2021-02-24 15:07:57 +00:00
takes_value: true
multiple: true
2020-04-27 14:49:26 +00:00
about: tests flags
global: true
- flag2:
short: F
2020-04-27 14:49:26 +00:00
about: tests flags with exclusions
conflicts_with:
- flag
requires:
- option2
- option2:
long: long-option-2
2020-04-27 14:49:26 +00:00
about: tests long options with exclusions
2015-10-01 01:45:35 +00:00
conflicts_with:
- option
2015-10-01 01:45:35 +00:00
requires:
- positional2
- option3:
short: O
long: Option
2020-04-27 14:49:26 +00:00
about: tests options with specific value sets
takes_value: true
possible_values:
- fast
- slow
requires_if:
- [fast, flag]
- positional3:
index: 3
2020-04-27 14:49:26 +00:00
about: tests positionals with specific values
possible_values: [ vi, emacs ]
- multvals:
long: multvals
about: Tests multiple values, not mult occs
value_names:
- one
- two
- multvalsmo:
long: multvalsmo
multiple: true
about: Tests multiple values, not mult occs
value_names: [one, two]
- multvalsdelim:
long: multvalsdelim
about: Tests multiple values with required delimiter
2021-02-24 15:07:57 +00:00
takes_value: true
multiple: true
2021-02-24 15:07:57 +00:00
use_delimiter: true
require_delimiter: true
2021-05-07 06:32:34 +00:00
- settings:
short: s
takes_value: true
multiple_values: true
- singlealias:
long: singlealias
2020-04-27 14:49:26 +00:00
about: Tests single alias
aliases: [alias]
2020-05-23 14:02:03 +00:00
required_if_eq:
- [multvalsmo, two]
- multaliases:
long: multaliases
about: Tests multiple aliases
aliases: [als1, als2, als3]
- singleshortalias:
long: singleshortalias
about: Tests single short alias
short_aliases: [a]
2020-05-23 14:02:03 +00:00
required_if_eq:
- [multvalsmo, two]
- multshortaliases:
long: multshortaliases
about: Tests multiple short aliases
2020-08-02 16:52:12 +00:00
short_aliases: [b, c]
- minvals2:
long: minvals2
multiple: true
2020-04-27 14:49:26 +00:00
about: Tests 2 min vals
min_values: 2
- maxvals3:
long: maxvals3
multiple: true
2020-04-27 14:49:26 +00:00
about: Tests 3 max vals
max_values: 3
- exclusive:
long: exclusive
2020-04-27 14:49:26 +00:00
about: Tests 3 exclusive
exclusive: true
- case_insensitive:
2020-05-12 08:39:24 +00:00
index: 4
help: Test case_insensitive
possible_values: [test123, test321]
case_insensitive: true
- value_hint:
long: value-hint
help: Test value_hint
value_hint: FilePath
2021-05-07 06:32:34 +00:00
- verbose:
short: v
multiple_occurrences: true
takes_value: false
help: Sets the level of verbosity
- visiblealiases:
long: visiblealiases
about: Tests visible aliases
visible_alias: visals1
visible_aliases: [visals2, visals2, visals3]
- visibleshortaliases:
long: visibleshortaliases
about: Tests visible short aliases
visible_short_alias: e
visible_short_aliases: [l, m]
2015-09-06 20:34:15 +00:00
arg_groups:
2015-09-04 17:58:00 +00:00
- test:
2015-10-01 01:45:35 +00:00
args:
2015-09-04 17:58:00 +00:00
- maxvals3
- minmals2
conflicts_with:
- option3
requires:
- multvals
subcommands:
- subcmd:
about: tests subcommands
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-28 03:42:31 +00:00
version: "0.1"
author: Kevin K. <kbknapp@gmail.com>
args:
- scoption:
short: o
long: option
multiple: true
2020-04-27 14:49:26 +00:00
about: tests options
takes_value: true
- scpositional:
2020-04-27 14:49:26 +00:00
about: tests positionals
index: 1