mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
Merge pull request #4219 from cakebaker/match_wildcard_for_single_variant
chore: fix wildcards that match single variant
This commit is contained in:
commit
69caa45b01
5 changed files with 7 additions and 7 deletions
|
@ -287,7 +287,7 @@ where
|
||||||
OutputFmt::Shell => result.push_str("LS_COLORS='"),
|
OutputFmt::Shell => result.push_str("LS_COLORS='"),
|
||||||
OutputFmt::CShell => result.push_str("setenv LS_COLORS '"),
|
OutputFmt::CShell => result.push_str("setenv LS_COLORS '"),
|
||||||
OutputFmt::Display => (),
|
OutputFmt::Display => (),
|
||||||
_ => unreachable!(),
|
OutputFmt::Unknown => unreachable!(),
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut table: HashMap<&str, &str> = HashMap::with_capacity(48);
|
let mut table: HashMap<&str, &str> = HashMap::with_capacity(48);
|
||||||
|
@ -405,7 +405,7 @@ where
|
||||||
// remove latest "\n"
|
// remove latest "\n"
|
||||||
result.pop();
|
result.pop();
|
||||||
}
|
}
|
||||||
_ => unreachable!(),
|
OutputFmt::Unknown => unreachable!(),
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(result)
|
Ok(result)
|
||||||
|
|
|
@ -634,7 +634,7 @@ where
|
||||||
match bad_format.cmp(&1) {
|
match bad_format.cmp(&1) {
|
||||||
Ordering::Equal => show_warning!("{} line is improperly formatted", bad_format),
|
Ordering::Equal => show_warning!("{} line is improperly formatted", bad_format),
|
||||||
Ordering::Greater => show_warning!("{} lines are improperly formatted", bad_format),
|
Ordering::Greater => show_warning!("{} lines are improperly formatted", bad_format),
|
||||||
_ => {}
|
Ordering::Less => {}
|
||||||
};
|
};
|
||||||
if failed_cksum > 0 {
|
if failed_cksum > 0 {
|
||||||
show_warning!("{} computed checksum did NOT match", failed_cksum);
|
show_warning!("{} computed checksum did NOT match", failed_cksum);
|
||||||
|
@ -644,7 +644,7 @@ where
|
||||||
Ordering::Greater => {
|
Ordering::Greater => {
|
||||||
show_warning!("{} listed files could not be read", failed_open_file);
|
show_warning!("{} listed files could not be read", failed_open_file);
|
||||||
}
|
}
|
||||||
_ => {}
|
Ordering::Less => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,7 @@ impl<'a> BytesGenerator<'a> {
|
||||||
fn new(total_bytes: u64, gen_type: PassType<'a>, exact: bool) -> BytesGenerator {
|
fn new(total_bytes: u64, gen_type: PassType<'a>, exact: bool) -> BytesGenerator {
|
||||||
let rng = match gen_type {
|
let rng = match gen_type {
|
||||||
PassType::Random => Some(RefCell::new(rand::thread_rng())),
|
PassType::Random => Some(RefCell::new(rand::thread_rng())),
|
||||||
_ => None,
|
PassType::Pattern(_) => None,
|
||||||
};
|
};
|
||||||
|
|
||||||
let bytes = [0; BLOCK_SIZE];
|
let bytes = [0; BLOCK_SIZE];
|
||||||
|
|
|
@ -396,7 +396,7 @@ pub fn canonicalize<P: AsRef<Path>>(
|
||||||
read_dir(parent)?;
|
read_dir(parent)?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {}
|
MissingHandling::Missing => {}
|
||||||
}
|
}
|
||||||
Ok(result)
|
Ok(result)
|
||||||
}
|
}
|
||||||
|
|
|
@ -278,7 +278,7 @@ pub fn escape_name(name: &OsStr, style: &QuotingStyle) -> String {
|
||||||
match quotes {
|
match quotes {
|
||||||
Quotes::Single => format!("'{}'", escaped_str),
|
Quotes::Single => format!("'{}'", escaped_str),
|
||||||
Quotes::Double => format!("\"{}\"", escaped_str),
|
Quotes::Double => format!("\"{}\"", escaped_str),
|
||||||
_ => escaped_str,
|
Quotes::None => escaped_str,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QuotingStyle::Shell {
|
QuotingStyle::Shell {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue