diff --git a/src/uucore/src/lib/lib.rs b/src/uucore/src/lib/lib.rs index 5cbf58faa..26beaff6e 100644 --- a/src/uucore/src/lib/lib.rs +++ b/src/uucore/src/lib/lib.rs @@ -120,9 +120,17 @@ static ARGV: Lazy> = Lazy::new(|| wild::args_os().collect()); static UTIL_NAME: Lazy = Lazy::new(|| { if get_utility_is_second_arg() { - &ARGV[1] + let i = match ARGV[1].eq("manpage") { + true => 1, + false => 0, + }; + &ARGV[1 + i] } else { - &ARGV[0] + let i = match ARGV[0].eq("manpage") { + true => 1, + false => 0, + }; + &ARGV[i] } .to_string_lossy() .into_owned()