1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

Made sleep suffixes case-insensitive

This commit is contained in:
Arcterus 2013-12-19 23:09:32 -08:00
parent c399046c1a
commit 410a964431

View file

@ -101,10 +101,10 @@ fn sleep(args: &[~str]) {
fn match_suffix(arg: &mut ~str) -> Result<int, ~str> {
let result = match (*arg).pop_char() {
's' => Ok(1),
'm' => Ok(60),
'h' => Ok(60 * 60),
'd' => Ok(60 * 60 * 24),
's' | 'S' => Ok(1),
'm' | 'M' => Ok(60),
'h' | 'H' => Ok(60 * 60),
'd' | 'D' => Ok(60 * 60 * 24),
val => {
(*arg).push_char(val);
if !val.is_alphabetic() {