mirror of
https://github.com/uutils/coreutils
synced 2024-07-21 18:04:45 +00:00
refactor/nl ~ polish spelling (comments, names, and exceptions)
This commit is contained in:
parent
00c02505a1
commit
5079972ba6
|
@ -29,7 +29,7 @@ pub fn parse_options(settings: &mut crate::Settings, opts: &clap::ArgMatches) ->
|
|||
// This vector holds error messages encountered.
|
||||
let mut errs: Vec<String> = vec![];
|
||||
settings.renumber = !opts.is_present(options::NO_RENUMBER);
|
||||
match opts.value_of(options::NUMER_SEPARATOR) {
|
||||
match opts.value_of(options::NUMBER_SEPARATOR) {
|
||||
None => {}
|
||||
Some(val) => {
|
||||
settings.number_separator = val.to_owned();
|
||||
|
@ -118,7 +118,7 @@ pub fn parse_options(settings: &mut crate::Settings, opts: &clap::ArgMatches) ->
|
|||
}
|
||||
}
|
||||
}
|
||||
match opts.value_of(options::STARTING_LINE_NUMER) {
|
||||
match opts.value_of(options::STARTING_LINE_NUMBER) {
|
||||
None => {}
|
||||
Some(val) => {
|
||||
let conv: Option<u64> = val.parse().ok();
|
||||
|
|
|
@ -79,8 +79,8 @@ pub mod options {
|
|||
pub const JOIN_BLANK_LINES: &str = "join-blank-lines";
|
||||
pub const NUMBER_FORMAT: &str = "number-format";
|
||||
pub const NO_RENUMBER: &str = "no-renumber";
|
||||
pub const NUMER_SEPARATOR: &str = "number-separator";
|
||||
pub const STARTING_LINE_NUMER: &str = "starting-line-number";
|
||||
pub const NUMBER_SEPARATOR: &str = "number-separator";
|
||||
pub const STARTING_LINE_NUMBER: &str = "starting-line-number";
|
||||
pub const NUMBER_WIDTH: &str = "number-width";
|
||||
}
|
||||
|
||||
|
@ -150,16 +150,16 @@ pub fn uumain(args: impl uucore::Args) -> i32 {
|
|||
.help("do not reset line numbers at logical pages"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name(options::NUMER_SEPARATOR)
|
||||
Arg::with_name(options::NUMBER_SEPARATOR)
|
||||
.short("s")
|
||||
.long(options::NUMER_SEPARATOR)
|
||||
.long(options::NUMBER_SEPARATOR)
|
||||
.help("add STRING after (possible) line number")
|
||||
.value_name("STRING"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name(options::STARTING_LINE_NUMER)
|
||||
Arg::with_name(options::STARTING_LINE_NUMBER)
|
||||
.short("v")
|
||||
.long(options::STARTING_LINE_NUMER)
|
||||
.long(options::STARTING_LINE_NUMBER)
|
||||
.help("first line number on each logical page")
|
||||
.value_name("NUMBER"),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue