Skip to content

Commit

Permalink
docs: Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Nov 17, 2021
1 parent 60aac47 commit dd97416
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/build/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -821,15 +821,15 @@ impl<'help> App<'help> {
/// Does awesome things\n\
/// (C) [email protected]\n\n\
///
/// USAGE: myapp <opts> <comamnd>\n\n\
/// USAGE: myapp <opts> <command>\n\n\
///
/// Options:\n\
/// -h, --help Display this message\n\
/// -V, --version Display version info\n\
/// -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")
/// # ;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
}
})
Expand Down
4 changes: 2 additions & 2 deletions src/build/arg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/build/arg/possible_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)`].
Expand Down
2 changes: 1 addition & 1 deletion src/output/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
files.extend-exclude = [
"CHANGELOG.md",
"tests",
]
[default.extend-words]
# Acronyms
als = "als"
lits = "lits"

0 comments on commit dd97416

Please sign in to comment.