@@ -259,7 +259,7 @@ impl<'a, 'b> Arg<'a, 'b> {
259
259
///
260
260
/// ### Explicit Name
261
261
///
262
- /// This is an optional field, if it's omitted the argumenet will use one of the additioinal
262
+ /// This is an optional field, if it's omitted the argument will use one of the additional
263
263
/// fields as the name using the following priority order:
264
264
///
265
265
/// * Explicit Name (This always takes precedence when present)
@@ -424,7 +424,7 @@ impl<'a, 'b> Arg<'a, 'b> {
424
424
///
425
425
/// # Examples
426
426
///
427
- /// To set `long` use a word containing valid UTF-8 codepoints. If you supply a dobule leading
427
+ /// To set `long` use a word containing valid UTF-8 codepoints. If you supply a double leading
428
428
/// `--` such as `--config` they will be stripped. Hyphens in the middle of the word, however,
429
429
/// will *not* be stripped (i.e. `config-file` is allowed)
430
430
///
@@ -628,9 +628,9 @@ impl<'a, 'b> Arg<'a, 'b> {
628
628
}
629
629
630
630
/// Sets args that override this arg's required setting. (i.e. this arg will be required unless
631
- /// all these other argument are present).
631
+ /// all these other arguments are present).
632
632
///
633
- /// **NOTE:** If you wish for the this argument to only be required if *one of* these args are
633
+ /// **NOTE:** If you wish for this argument to only be required if *one of* these args are
634
634
/// present see [`Arg::required_unless_one`]
635
635
///
636
636
/// # Examples
@@ -703,9 +703,9 @@ impl<'a, 'b> Arg<'a, 'b> {
703
703
}
704
704
705
705
/// Sets args that override this arg's [required] setting. (i.e. this arg will be required
706
- /// unless *at least one of* these other argument are present).
706
+ /// unless *at least one of* these other arguments are present).
707
707
///
708
- /// **NOTE:** If you wish for the this argument to only be required if *all of* these args are
708
+ /// **NOTE:** If you wish for this argument to only be required if *all of* these args are
709
709
/// present see [`Arg::required_unless_all`]
710
710
///
711
711
/// # Examples
@@ -879,7 +879,7 @@ impl<'a, 'b> Arg<'a, 'b> {
879
879
/// will override each other in POSIX style (whichever argument was specified at runtime
880
880
/// **last** "wins")
881
881
///
882
- /// **NOTE:** When an argument is overriden it is essentially as if it never was used, any
882
+ /// **NOTE:** When an argument is overridden it is essentially as if it never was used, any
883
883
/// conflicts, requirements, etc. are evaluated **after** all "overrides" have been removed
884
884
///
885
885
/// # Examples
@@ -893,11 +893,11 @@ impl<'a, 'b> Arg<'a, 'b> {
893
893
/// .arg(Arg::from_usage("-c, --color 'third flag'")
894
894
/// .overrides_with("flag"))
895
895
/// .get_matches_from(vec!["posix", "-f", "-d", "-c"]);
896
- /// // ^~~~~~~~~~~~^~~~~ flag is overriden by color
896
+ /// // ^~~~~~~~~~~~^~~~~ flag is overridden by color
897
897
///
898
898
/// assert!(m.is_present("color"));
899
899
/// assert!(m.is_present("debug")); // even though flag conflicts with debug, it's as if flag
900
- /// // was never used because it was overriden with color
900
+ /// // was never used because it was overridden with color
901
901
/// assert!(!m.is_present("flag"));
902
902
/// ```
903
903
pub fn overrides_with ( mut self , name : & ' a str ) -> Self {
@@ -913,7 +913,7 @@ impl<'a, 'b> Arg<'a, 'b> {
913
913
/// argument will override each other in POSIX style (whichever argument was specified at
914
914
/// runtime **last** "wins")
915
915
///
916
- /// **NOTE:** When an argument is overriden it is essentially as if it never was used, any
916
+ /// **NOTE:** When an argument is overridden it is essentially as if it never was used, any
917
917
/// conflicts, requirements, etc. are evaluated **after** all "overrides" have been removed
918
918
///
919
919
/// # Examples
@@ -927,10 +927,10 @@ impl<'a, 'b> Arg<'a, 'b> {
927
927
/// .arg(Arg::from_usage("-c, --color 'third flag'")
928
928
/// .overrides_with_all(&["flag", "debug"]))
929
929
/// .get_matches_from(vec!["posix", "-f", "-d", "-c"]);
930
- /// // ^~~~~~^~~~~~~~~ flag and debug are overriden by color
930
+ /// // ^~~~~~^~~~~~~~~ flag and debug are overridden by color
931
931
///
932
932
/// assert!(m.is_present("color")); // even though flag conflicts with color, it's as if flag
933
- /// // and debug were never used because they were overriden
933
+ /// // and debug were never used because they were overridden
934
934
/// // with color
935
935
/// assert!(!m.is_present("debug"));
936
936
/// assert!(!m.is_present("flag"));
@@ -961,7 +961,7 @@ impl<'a, 'b> Arg<'a, 'b> {
961
961
/// ```
962
962
///
963
963
/// Setting [`Arg::requires(name)`] requires that the argument be used at runtime if the
964
- /// defining argument is used. If the defining argument isn't used, the other arguemnt isn't
964
+ /// defining argument is used. If the defining argument isn't used, the other argument isn't
965
965
/// required
966
966
///
967
967
/// ```rust
@@ -1027,7 +1027,7 @@ impl<'a, 'b> Arg<'a, 'b> {
1027
1027
///
1028
1028
/// Setting [`Arg::requires_all(&[arg, arg2])`] requires that all the arguments be used at
1029
1029
/// runtime if the defining argument is used. If the defining argument isn't used, the other
1030
- /// arguemnt isn't required
1030
+ /// argument isn't required
1031
1031
///
1032
1032
/// ```rust
1033
1033
/// # use clap::{App, Arg};
@@ -1091,10 +1091,10 @@ impl<'a, 'b> Arg<'a, 'b> {
1091
1091
/// * Using an equals and no space such as `-o=value` or `--option=value`
1092
1092
/// * Use a short and no space such as `-ovalue`
1093
1093
///
1094
- /// **NOTE:** By default, args which allow [multiple values] are delimted by commas, meaning
1095
- /// `--option=val1,val2,val3` is is three values for the `--option` argument. If you wish to
1094
+ /// **NOTE:** By default, args which allow [multiple values] are delimited by commas, meaning
1095
+ /// `--option=val1,val2,val3` is three values for the `--option` argument. If you wish to
1096
1096
/// change the delimiter to another character you can use [`Arg::value_delimiter(char)`],
1097
- /// alternatively you can delimiting values **OFF** by using [`Arg::use_delimiter(false)`]
1097
+ /// alternatively you can turn delimiting values **OFF** by using [`Arg::use_delimiter(false)`]
1098
1098
///
1099
1099
/// # Examples
1100
1100
///
@@ -1136,7 +1136,7 @@ impl<'a, 'b> Arg<'a, 'b> {
1136
1136
/// leave off the `index` method, and the index will be assigned in order of evaluation.
1137
1137
/// Utilizing the `index` method allows for setting indexes out of order
1138
1138
///
1139
- /// **NOTE:** When utilized with [`Arg::multiple(true)`], only the **last** psoitional argument
1139
+ /// **NOTE:** When utilized with [`Arg::multiple(true)`], only the **last** positional argument
1140
1140
/// may be defined as multiple (i.e. with the highest index)
1141
1141
///
1142
1142
/// # Panics
@@ -1188,9 +1188,9 @@ impl<'a, 'b> Arg<'a, 'b> {
1188
1188
/// **WARNING:**
1189
1189
///
1190
1190
/// Setting `multiple(true)` for an [option] with no other details, allows multiple values
1191
- /// **and** multiple occurrences because it isn't possible to more occurrences than values for
1191
+ /// **and** multiple occurrences because it isn't possible to have more occurrences than values for
1192
1192
/// options. Because multiple values are allowed, `--option val1 val2 val3` is perfectly valid,
1193
- /// be careful when designing a CLI where positional arguments are expectd after a option which
1193
+ /// be careful when designing a CLI where positional arguments are expected after a option which
1194
1194
/// accepts multiple values, as `clap` will continue parsing *values* until it reaches the max
1195
1195
/// or specific number of values defined, or another flag or option.
1196
1196
///
@@ -1700,11 +1700,11 @@ impl<'a, 'b> Arg<'a, 'b> {
1700
1700
/// `-f <file>` argument where you wanted up to 3 'files' you would set `.max_values(3)`, and
1701
1701
/// this argument would be satisfied if the user provided, 1, 2, or 3 values.
1702
1702
///
1703
- /// **NOTE:** This does *not* implicitly set [`Arg::mulitple (true)`]. This is because
1704
- /// `-o val -o val` is multiples occurrences but a single value and `-o val1 val2` is a single
1703
+ /// **NOTE:** This does *not* implicitly set [`Arg::multiple (true)`]. This is because
1704
+ /// `-o val -o val` is multiple occurrences but a single value and `-o val1 val2` is a single
1705
1705
/// occurence with multple values. For positional arguments this **does** set
1706
- /// [`Arg::multiple(true)`] because there is no way to determine the diffrence between multiple
1707
- /// occureces and multiple values.
1706
+ /// [`Arg::multiple(true)`] because there is no way to determine the difference between multiple
1707
+ /// occurences and multiple values.
1708
1708
///
1709
1709
/// # Examples
1710
1710
///
@@ -1747,22 +1747,22 @@ impl<'a, 'b> Arg<'a, 'b> {
1747
1747
/// assert!(res.is_err());
1748
1748
/// assert_eq!(res.unwrap_err().kind, ErrorKind::TooManyValues);
1749
1749
/// ```
1750
- /// [`Arg::mulitple (true)`]: ./struct.Arg.html#method.multiple
1750
+ /// [`Arg::multiple (true)`]: ./struct.Arg.html#method.multiple
1751
1751
pub fn max_values ( mut self , qty : u64 ) -> Self {
1752
1752
self . max_vals = Some ( qty) ;
1753
1753
self
1754
1754
}
1755
1755
1756
- /// Specifies the *minimum* number of values are for this argument. For example, if you had a
1756
+ /// Specifies the *minimum* number of values for this argument. For example, if you had a
1757
1757
/// `-f <file>` argument where you wanted at least 2 'files' you would set
1758
1758
/// `.min_values(2)`, and this argument would be satisfied if the user provided, 2 or more
1759
1759
/// values.
1760
1760
///
1761
- /// **NOTE:** This does not implicitly set [`Arg::mulitple (true)`]. This is because
1762
- /// `-o val -o val` is multiples occurrences but a single value and `-o val1 val2` is a single
1763
- /// occurence with multple values. For positional arguments this **does** set
1764
- /// [`Arg::multiple(true)`] because there is no way to determine the diffrence between multiple
1765
- /// occureces and multiple values.
1761
+ /// **NOTE:** This does not implicitly set [`Arg::multiple (true)`]. This is because
1762
+ /// `-o val -o val` is multiple occurrences but a single value and `-o val1 val2` is a single
1763
+ /// occurence with multiple values. For positional arguments this **does** set
1764
+ /// [`Arg::multiple(true)`] because there is no way to determine the difference between multiple
1765
+ /// occurences and multiple values.
1766
1766
///
1767
1767
/// # Examples
1768
1768
///
@@ -1791,7 +1791,7 @@ impl<'a, 'b> Arg<'a, 'b> {
1791
1791
/// assert_eq!(files, ["file1", "file2", "file3"]);
1792
1792
/// ```
1793
1793
///
1794
- /// Supplying less than the mainimum number of values is an error
1794
+ /// Supplying less than the minimum number of values is an error
1795
1795
///
1796
1796
/// ```rust
1797
1797
/// # use clap::{App, Arg, ErrorKind};
@@ -1805,18 +1805,18 @@ impl<'a, 'b> Arg<'a, 'b> {
1805
1805
/// assert!(res.is_err());
1806
1806
/// assert_eq!(res.unwrap_err().kind, ErrorKind::TooFewValues);
1807
1807
/// ```
1808
- /// [`Arg::mulitple (true)`]: ./struct.Arg.html#method.multiple
1808
+ /// [`Arg::multiple (true)`]: ./struct.Arg.html#method.multiple
1809
1809
pub fn min_values ( mut self , qty : u64 ) -> Self {
1810
1810
self . min_vals = Some ( qty) ;
1811
1811
self . set ( ArgSettings :: TakesValue )
1812
1812
}
1813
1813
1814
- /// Specifies whether or not an arugment should allow grouping of multiple values via a
1815
- /// delimter . I.e. shoulde `--option=val1,val2,val3` be parsed as three values (`val1`, `val2`,
1814
+ /// Specifies whether or not an argument should allow grouping of multiple values via a
1815
+ /// delimiter . I.e. should `--option=val1,val2,val3` be parsed as three values (`val1`, `val2`,
1816
1816
/// and `val3`) or as a single value (`val1,val2,val3`). Defaults to using `,` (comma) as the
1817
1817
/// value delimiter for all arguments that accept values (options and positional arguments)
1818
1818
///
1819
- /// **NOTE:** The defalt is `true`. Setting the value to `true` will reset any previous use of
1819
+ /// **NOTE:** The default is `true`. Setting the value to `true` will reset any previous use of
1820
1820
/// [`Arg::value_delimiter`] back to the default of `,` (comma).
1821
1821
///
1822
1822
/// # Examples
@@ -1978,7 +1978,7 @@ impl<'a, 'b> Arg<'a, 'b> {
1978
1978
}
1979
1979
1980
1980
/// Specifies the name for value of [option] or [positional] arguments inside of help
1981
- /// documenation . This name is cosmetic only, the name is **not** used to access arguments.
1981
+ /// documentation . This name is cosmetic only, the name is **not** used to access arguments.
1982
1982
/// This setting can be very helpful when describing the type of input the user should be
1983
1983
/// using, such as `FILE`, `INTERFACE`, etc. Although not required, it's somewhat convention to
1984
1984
/// use all capital letters for the value name.
0 commit comments