File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -52,14 +52,15 @@ fn main() {
5252 } ) ;
5353
5454 // binary name ends with util name?
55+ let is_coreutils = binary_as_util. ends_with ( "utils" ) ;
5556 let matched_util = utils
5657 . keys ( )
57- . filter ( |& & u| binary_as_util. ends_with ( u) && !binary_as_util . ends_with ( "coreutils" ) )
58- . max_by_key ( |u| u. len ( ) ) ; //Prefer stty more than tty. coreutils is not ls
58+ . filter ( |& & u| binary_as_util. ends_with ( u) && !is_coreutils )
59+ . max_by_key ( |u| u. len ( ) ) ; //Prefer stty more than tty. *utils is not ls
5960
6061 let util_name = if let Some ( & util) = matched_util {
6162 Some ( OsString :: from ( util) )
62- } else if binary_as_util . ends_with ( "utils" ) || binary_as_util. ends_with ( "box" ) {
63+ } else if is_coreutils || binary_as_util. ends_with ( "box" ) {
6364 // todo: Remove support of "*box" from binary
6465 uucore:: set_utility_is_second_arg ( ) ;
6566 args. next ( )
You can’t perform that action at this time.
0 commit comments