mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 06:44:16 +00:00
docs: Fix typos
This commit is contained in:
parent
60aac4760a
commit
dd974168fd
5 changed files with 16 additions and 8 deletions
|
@ -821,7 +821,7 @@ impl<'help> App<'help> {
|
|||
/// Does awesome things\n\
|
||||
/// (C) me@mail.com\n\n\
|
||||
///
|
||||
/// USAGE: myapp <opts> <comamnd>\n\n\
|
||||
/// USAGE: myapp <opts> <command>\n\n\
|
||||
///
|
||||
/// Options:\n\
|
||||
/// -h, --help Display this message\n\
|
||||
|
@ -829,7 +829,7 @@ impl<'help> App<'help> {
|
|||
/// -s <stuff> Do something with stuff\n\
|
||||
/// -v Be verbose\n\n\
|
||||
///
|
||||
/// Commmands:\n\
|
||||
/// Commands:\n\
|
||||
/// help Print this message\n\
|
||||
/// work Do some work")
|
||||
/// # ;
|
||||
|
@ -2490,7 +2490,7 @@ impl<'help> App<'help> {
|
|||
|
||||
// Remove generated help and version args in the subcommand
|
||||
//
|
||||
// Don't remove if those args are futher mutated
|
||||
// Don't remove if those args are further mutated
|
||||
if is_generated {
|
||||
let generated_pos = sc
|
||||
.args
|
||||
|
@ -2743,7 +2743,7 @@ impl<'help> App<'help> {
|
|||
// Print val_name for positional arguments. e.g. <file_name>
|
||||
x.name_no_brackets().to_string()
|
||||
} else {
|
||||
// Print useage string for flags arguments, e.g. <--help>
|
||||
// Print usage string for flags arguments, e.g. <--help>
|
||||
x.to_string()
|
||||
}
|
||||
})
|
||||
|
|
|
@ -4367,7 +4367,7 @@ impl<'help> Arg<'help> {
|
|||
/// assert_eq!(files, ["file1", "file2", "file3"]);
|
||||
/// ```
|
||||
///
|
||||
/// Although `MultipleVlaues` has been specified, we cannot use the argument more than once.
|
||||
/// Although `MultipleValues` has been specified, we cannot use the argument more than once.
|
||||
///
|
||||
/// ```rust
|
||||
/// # use clap::{App, Arg, ErrorKind, ArgSettings};
|
||||
|
@ -5120,7 +5120,7 @@ where
|
|||
}
|
||||
}
|
||||
} else if let Some(num_vals) = arg.num_vals {
|
||||
// If number_of_values is sepcified, display the value multiple times.
|
||||
// If number_of_values is specified, display the value multiple times.
|
||||
let arg_name = format!("<{}>", arg.name);
|
||||
let mut it = iter::repeat(&arg_name).take(num_vals).peekable();
|
||||
while let Some(arg_name) = it.next() {
|
||||
|
|
|
@ -107,7 +107,7 @@ impl<'help> PossibleValue<'help> {
|
|||
|
||||
impl<'help> PossibleValue<'help> {
|
||||
/// Creates a new instance of [`PossibleValue`] using a string name. The name will be used to
|
||||
/// decide wether this value was provided by the user to an argument.
|
||||
/// decide whether this value was provided by the user to an argument.
|
||||
///
|
||||
/// **NOTE:** In case it is not [hidden] it will also be shown in help messages for arguments
|
||||
/// that use it as a [possible value] and have not hidden them through [`Arg::hide_possible_values(true)`].
|
||||
|
|
|
@ -1039,7 +1039,7 @@ mod test {
|
|||
|
||||
#[test]
|
||||
fn display_width_handles_non_ascii() {
|
||||
// Popular Danish tounge-twister, the name of a fruit dessert.
|
||||
// Popular Danish tongue-twister, the name of a fruit dessert.
|
||||
let text = "rødgrød med fløde";
|
||||
assert_eq!(display_width(text), 17);
|
||||
// Note that the string width is smaller than the string
|
||||
|
|
8
typos.toml
Normal file
8
typos.toml
Normal file
|
@ -0,0 +1,8 @@
|
|||
files.extend-exclude = [
|
||||
"CHANGELOG.md",
|
||||
"tests",
|
||||
]
|
||||
[default.extend-words]
|
||||
# Acronyms
|
||||
als = "als"
|
||||
lits = "lits"
|
Loading…
Reference in a new issue