mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
Added condition to ensure name of utility appears
This commit is contained in:
parent
2a92e434c1
commit
6699eaad6c
1 changed files with 10 additions and 2 deletions
|
@ -120,9 +120,17 @@ static ARGV: Lazy<Vec<OsString>> = Lazy::new(|| wild::args_os().collect());
|
|||
|
||||
static UTIL_NAME: Lazy<String> = 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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue