mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
fix: typo fixes found by codespell
This commit is contained in:
parent
df44af2321
commit
6e8c901204
13 changed files with 16 additions and 16 deletions
|
@ -9,7 +9,7 @@ os:
|
||||||
# - osx
|
# - osx
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# sphinx v1.8.0 is bugged & fails for linux builds; so, force specfic `sphinx` version
|
# sphinx v1.8.0 is bugged & fails for linux builds; so, force specific `sphinx` version
|
||||||
global: FEATURES='' TEST_INSTALL='' SPHINX_VERSIONED='sphinx==1.7.8'
|
global: FEATURES='' TEST_INSTALL='' SPHINX_VERSIONED='sphinx==1.7.8'
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
|
|
|
@ -18,7 +18,7 @@ search the issues to make sure no one else is working on it.
|
||||||
## Commit messages
|
## Commit messages
|
||||||
|
|
||||||
To help the project maintainers review pull requests from contributors across
|
To help the project maintainers review pull requests from contributors across
|
||||||
numerous utilites, the team has settled on conventions for commit messages.
|
numerous utilities, the team has settled on conventions for commit messages.
|
||||||
|
|
||||||
From http://git-scm.com/book/ch5-2.html:
|
From http://git-scm.com/book/ch5-2.html:
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,7 @@ feat_require_unix = [
|
||||||
"uname",
|
"uname",
|
||||||
"unlink",
|
"unlink",
|
||||||
]
|
]
|
||||||
# "feat_require_unix_utmpx" == set of utilites requiring unix utmp/utmpx support
|
# "feat_require_unix_utmpx" == set of utilities requiring unix utmp/utmpx support
|
||||||
# * ref: <https://wiki.musl-libc.org/faq.html#Q:-Why-is-the-utmp/wtmp-functionality-only-implemented-as-stubs?>
|
# * ref: <https://wiki.musl-libc.org/faq.html#Q:-Why-is-the-utmp/wtmp-functionality-only-implemented-as-stubs?>
|
||||||
feat_require_unix_utmpx = [
|
feat_require_unix_utmpx = [
|
||||||
"pinky",
|
"pinky",
|
||||||
|
@ -170,7 +170,7 @@ feat_require_unix_utmpx = [
|
||||||
"who",
|
"who",
|
||||||
]
|
]
|
||||||
## (alternate/newer/smaller platforms) feature sets
|
## (alternate/newer/smaller platforms) feature sets
|
||||||
# "feat_os_unix_fuchsia" == set of utilities which can be built/run on the "Fuschia" OS (refs: <https://fuchsia.dev>; <https://en.wikipedia.org/wiki/Google_Fuchsia>)
|
# "feat_os_unix_fuchsia" == set of utilities which can be built/run on the "Fuchsia" OS (refs: <https://fuchsia.dev>; <https://en.wikipedia.org/wiki/Google_Fuchsia>)
|
||||||
feat_os_unix_fuchsia = [
|
feat_os_unix_fuchsia = [
|
||||||
"feat_common_core",
|
"feat_common_core",
|
||||||
#
|
#
|
||||||
|
|
|
@ -59,7 +59,7 @@ quick_error! {
|
||||||
cause(err)
|
cause(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Uknown Filetype classification
|
/// Unknown Filetype classification
|
||||||
UnknownFiletype(path: String) {
|
UnknownFiletype(path: String) {
|
||||||
display("cat: {0}: unknown filetype", path)
|
display("cat: {0}: unknown filetype", path)
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ pub fn uumain(mut args: Vec<String>) -> i32 {
|
||||||
.opt_str("reference")
|
.opt_str("reference")
|
||||||
.and_then(|ref fref| match fs::metadata(fref) {
|
.and_then(|ref fref| match fs::metadata(fref) {
|
||||||
Ok(meta) => Some(meta.mode()),
|
Ok(meta) => Some(meta.mode()),
|
||||||
Err(err) => crash!(1, "cannot stat attribues of '{}': {}", fref, err),
|
Err(err) => crash!(1, "cannot stat attributes of '{}': {}", fref, err),
|
||||||
});
|
});
|
||||||
let cmode = if fmode.is_none() {
|
let cmode = if fmode.is_none() {
|
||||||
// If there was a negative option, now it's a good time to
|
// If there was a negative option, now it's a good time to
|
||||||
|
|
|
@ -86,7 +86,7 @@ quick_error! {
|
||||||
from(err: &'static str) -> (err.to_string())
|
from(err: &'static str) -> (err.to_string())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Represents the state when a non-fatal error has occured
|
/// Represents the state when a non-fatal error has occurred
|
||||||
/// and not all files were copied.
|
/// and not all files were copied.
|
||||||
NotAllFilesCopied {}
|
NotAllFilesCopied {}
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ fn cut_bytes<R: Read>(reader: R, ranges: &[Range], opts: &Options) -> i32 {
|
||||||
let mut print_delim = false;
|
let mut print_delim = false;
|
||||||
|
|
||||||
for &Range { low, high } in ranges.iter() {
|
for &Range { low, high } in ranges.iter() {
|
||||||
// skip upto low
|
// skip up to low
|
||||||
let orig_pos = cur_pos;
|
let orig_pos = cur_pos;
|
||||||
loop {
|
loop {
|
||||||
match buf_read.select(low - cur_pos, None::<&mut Stdout>) {
|
match buf_read.select(low - cur_pos, None::<&mut Stdout>) {
|
||||||
|
|
|
@ -36,7 +36,7 @@ const LONG_HELP: &str = "
|
||||||
ers of 1000).
|
ers of 1000).
|
||||||
";
|
";
|
||||||
|
|
||||||
// TODO: Suport Z & Y (currently limited by size of u64)
|
// TODO: Support Z & Y (currently limited by size of u64)
|
||||||
const UNITS: [(char, u32); 6] = [('E', 6), ('P', 5), ('T', 4), ('G', 3), ('M', 2), ('K', 1)];
|
const UNITS: [(char, u32); 6] = [('E', 6), ('P', 5), ('T', 4), ('G', 3), ('M', 2), ('K', 1)];
|
||||||
|
|
||||||
struct Options {
|
struct Options {
|
||||||
|
|
|
@ -69,7 +69,7 @@ impl Digest for sha1::Sha1 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Implements the Digest trait for sha2 / sha3 algorithms with fixed ouput
|
// Implements the Digest trait for sha2 / sha3 algorithms with fixed output
|
||||||
macro_rules! impl_digest_sha {
|
macro_rules! impl_digest_sha {
|
||||||
($type: ty, $size: expr) => {
|
($type: ty, $size: expr) => {
|
||||||
impl Digest for $type {
|
impl Digest for $type {
|
||||||
|
@ -96,7 +96,7 @@ macro_rules! impl_digest_sha {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Implements the Digest trait for sha2 / sha3 algorithms with variable ouput
|
// Implements the Digest trait for sha2 / sha3 algorithms with variable output
|
||||||
macro_rules! impl_digest_shake {
|
macro_rules! impl_digest_shake {
|
||||||
($type: ty) => {
|
($type: ty) => {
|
||||||
impl Digest for $type {
|
impl Digest for $type {
|
||||||
|
|
|
@ -247,7 +247,7 @@ fn link_files_in_dir(files: &[PathBuf], target_dir: &PathBuf, settings: &Setting
|
||||||
Some(basename) => target_dir.join(basename),
|
Some(basename) => target_dir.join(basename),
|
||||||
// This can be None only for "." or "..". Trying
|
// This can be None only for "." or "..". Trying
|
||||||
// to create a link with such name will fail with
|
// to create a link with such name will fail with
|
||||||
// EEXIST, which agrees with the bahavior of GNU
|
// EEXIST, which agrees with the behavior of GNU
|
||||||
// coreutils.
|
// coreutils.
|
||||||
None => target_dir.join(name),
|
None => target_dir.join(name),
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ impl<'b> io::Read for MultifileReader<'b> {
|
||||||
// If any call returns short (< buf.len()), all subsequent calls will return Ok<0>
|
// If any call returns short (< buf.len()), all subsequent calls will return Ok<0>
|
||||||
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
|
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
|
||||||
let mut xfrd = 0;
|
let mut xfrd = 0;
|
||||||
// while buffer we are filling is not full.. May go thru several files.
|
// while buffer we are filling is not full.. May go through several files.
|
||||||
'fillloop: while xfrd < buf.len() {
|
'fillloop: while xfrd < buf.len() {
|
||||||
match self.curr_file {
|
match self.curr_file {
|
||||||
None => break,
|
None => break,
|
||||||
|
|
|
@ -139,9 +139,9 @@ fn print_usage(opts: &Options) {
|
||||||
ptx -G [OPTION]... [INPUT [OUTPUT]] \n Output a permuted index, \
|
ptx -G [OPTION]... [INPUT [OUTPUT]] \n Output a permuted index, \
|
||||||
including context, of the words in the input files. \n\n Mandatory \
|
including context, of the words in the input files. \n\n Mandatory \
|
||||||
arguments to long options are mandatory for short options too.";
|
arguments to long options are mandatory for short options too.";
|
||||||
let explaination = "With no FILE, or when FILE is -, read standard input. \
|
let explanation = "With no FILE, or when FILE is -, read standard input. \
|
||||||
Default is '-F /'.";
|
Default is '-F /'.";
|
||||||
println!("{}\n{}", opts.usage(&brief), explaination);
|
println!("{}\n{}", opts.usage(&brief), explanation);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_config(matches: &Matches) -> Config {
|
fn get_config(matches: &Matches) -> Config {
|
||||||
|
|
|
@ -22,7 +22,7 @@ fn test_boot() {
|
||||||
fn test_heading() {
|
fn test_heading() {
|
||||||
for opt in vec!["-H"] {
|
for opt in vec!["-H"] {
|
||||||
// allow whitespace variation
|
// allow whitespace variation
|
||||||
// * minor whitespace differences occur between platform built-in outputs; specfically number of TABs between "TIME" and "COMMENT" may be variant
|
// * minor whitespace differences occur between platform built-in outputs; specifically number of TABs between "TIME" and "COMMENT" may be variant
|
||||||
let actual = new_ucmd!().arg(opt).run().stdout;
|
let actual = new_ucmd!().arg(opt).run().stdout;
|
||||||
let expect = expected_result(opt);
|
let expect = expected_result(opt);
|
||||||
println!("actual: {:?}", actual);
|
println!("actual: {:?}", actual);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue