diff --git a/src/uu/base32/src/base_common.rs b/src/uu/base32/src/base_common.rs index 3d08275c5..bbd178498 100644 --- a/src/uu/base32/src/base_common.rs +++ b/src/uu/base32/src/base_common.rs @@ -45,7 +45,7 @@ pub fn execute( let decode = matches.opt_present("decode"); if matches.free.len() > 1 { - disp_err!("extra operand ‘{}’", matches.free[0]); + show_usage_error!("extra operand ‘{}’", matches.free[0]); return 1; } diff --git a/src/uu/base64/src/base_common.rs b/src/uu/base64/src/base_common.rs index 3d08275c5..bbd178498 100644 --- a/src/uu/base64/src/base_common.rs +++ b/src/uu/base64/src/base_common.rs @@ -45,7 +45,7 @@ pub fn execute( let decode = matches.opt_present("decode"); if matches.free.len() > 1 { - disp_err!("extra operand ‘{}’", matches.free[0]); + show_usage_error!("extra operand ‘{}’", matches.free[0]); return 1; } diff --git a/src/uu/chgrp/src/chgrp.rs b/src/uu/chgrp/src/chgrp.rs index 3435e66bf..f781c77a4 100644 --- a/src/uu/chgrp/src/chgrp.rs +++ b/src/uu/chgrp/src/chgrp.rs @@ -115,10 +115,10 @@ pub fn uumain(args: Vec) -> i32 { }; if matches.free.is_empty() { - disp_err!("missing operand"); + show_usage_error!("missing operand"); return 1; } else if matches.free.len() < 2 && !matches.opt_present("reference") { - disp_err!("missing operand after ‘{}’", matches.free[0]); + show_usage_error!("missing operand after ‘{}’", matches.free[0]); return 1; } diff --git a/src/uu/chown/src/chown.rs b/src/uu/chown/src/chown.rs index 920adaeb6..777950de0 100644 --- a/src/uu/chown/src/chown.rs +++ b/src/uu/chown/src/chown.rs @@ -135,10 +135,10 @@ pub fn uumain(args: Vec) -> i32 { }; if matches.free.is_empty() { - disp_err!("missing operand"); + show_usage_error!("missing operand"); return 1; } else if matches.free.len() < 2 && !matches.opt_present("reference") { - disp_err!("missing operand after ‘{}’", matches.free[0]); + show_usage_error!("missing operand after ‘{}’", matches.free[0]); return 1; } diff --git a/src/uu/dircolors/src/dircolors.rs b/src/uu/dircolors/src/dircolors.rs index 500815d60..173c15d75 100644 --- a/src/uu/dircolors/src/dircolors.rs +++ b/src/uu/dircolors/src/dircolors.rs @@ -71,7 +71,7 @@ pub fn uumain(args: Vec) -> i32 { || matches.opt_present("bourne-shell")) && matches.opt_present("print-database") { - disp_err!( + show_usage_error!( "the options to output dircolors' internal database and\nto select a shell \ syntax are mutually exclusive" ); @@ -80,7 +80,7 @@ pub fn uumain(args: Vec) -> i32 { if matches.opt_present("print-database") { if !matches.free.is_empty() { - disp_err!( + show_usage_error!( "extra operand ‘{}’\nfile operands cannot be combined with \ --print-database (-p)", matches.free[0] @@ -113,7 +113,7 @@ pub fn uumain(args: Vec) -> i32 { result = parse(INTERNAL_DB.lines(), out_format, "") } else { if matches.free.len() > 1 { - disp_err!("extra operand ‘{}’", matches.free[1]); + show_usage_error!("extra operand ‘{}’", matches.free[1]); return 1; } match File::open(matches.free[0].as_str()) { diff --git a/src/uu/mknod/src/mknod.rs b/src/uu/mknod/src/mknod.rs index c2a27feb3..a24e2700d 100644 --- a/src/uu/mknod/src/mknod.rs +++ b/src/uu/mknod/src/mknod.rs @@ -117,8 +117,8 @@ for details about the options it supports.", let mut ret = 0i32; match matches.free.len() { - 0 => disp_err!("missing operand"), - 1 => disp_err!("missing operand after ‘{}’", matches.free[0]), + 0 => show_usage_error!("missing operand"), + 1 => show_usage_error!("missing operand after ‘{}’", matches.free[0]), _ => { let args = &matches.free; let c_str = CString::new(args[0].as_str()).expect("Failed to convert to CString"); @@ -150,10 +150,10 @@ for details about the options it supports.", eprintln!("Try '{} --help' for more information.", NAME); return 1; } else if args.len() > 4 { - disp_err!("extra operand ‘{}’", args[4]); + show_usage_error!("extra operand ‘{}’", args[4]); return 1; } else if !"bcu".contains(ch) { - disp_err!("invalid device type ‘{}’", args[1]); + show_usage_error!("invalid device type ‘{}’", args[1]); return 1; } diff --git a/src/uu/od/src/od.rs b/src/uu/od/src/od.rs index e007010a8..e2fb7c290 100644 --- a/src/uu/od/src/od.rs +++ b/src/uu/od/src/od.rs @@ -294,7 +294,7 @@ pub fn uumain(args: Vec) -> i32 { let matches = match opts.parse(&args[1..]) { Ok(m) => m, Err(f) => { - disp_err!("{}", f); + show_usage_error!("{}", f); return 1; } }; @@ -310,7 +310,7 @@ pub fn uumain(args: Vec) -> i32 { let od_options = match OdOptions::new(matches, args) { Err(s) => { - disp_err!("{}", s); + show_usage_error!("{}", s); return 1; } Ok(o) => o, diff --git a/src/uu/pinky/src/pinky.rs b/src/uu/pinky/src/pinky.rs index ce509dbe1..a9b442601 100644 --- a/src/uu/pinky/src/pinky.rs +++ b/src/uu/pinky/src/pinky.rs @@ -119,7 +119,7 @@ The utmp file will be {}", } if !do_short_format && matches.free.is_empty() { - disp_err!("no username specified; at least one must be specified when using -l"); + show_usage_error!("no username specified; at least one must be specified when using -l"); return 1; } @@ -136,7 +136,7 @@ The utmp file will be {}", if do_short_format { if let Err(e) = pk.short_pinky() { - disp_err!("{}", e); + show_usage_error!("{}", e); 1 } else { 0 diff --git a/src/uu/stat/src/stat.rs b/src/uu/stat/src/stat.rs index 7608bf6f1..a23d5201f 100644 --- a/src/uu/stat/src/stat.rs +++ b/src/uu/stat/src/stat.rs @@ -891,7 +891,7 @@ pub fn uumain(args: Vec) -> i32 { let matches = match opts.parse(&args[1..]) { Ok(m) => m, Err(f) => { - disp_err!("{}", f); + show_usage_error!("{}", f); return 1; } }; @@ -903,7 +903,7 @@ pub fn uumain(args: Vec) -> i32 { } if matches.free.is_empty() { - disp_err!("missing operand"); + show_usage_error!("missing operand"); return 1; } diff --git a/src/uu/who/src/who.rs b/src/uu/who/src/who.rs index e0bd68101..9587a9d3e 100644 --- a/src/uu/who/src/who.rs +++ b/src/uu/who/src/who.rs @@ -205,7 +205,7 @@ pub fn uumain(args: Vec) -> i32 { } if matches.free.len() > 2 { - disp_err!("{}", msg_wrong_number_of_arguments!()); + show_usage_error!("{}", msg_wrong_number_of_arguments!()); exit!(1); } }