TOOLS/zsh.pl: sort options in reverse order by length
This stops options that are prefixes of other options from blocking completion of values for the longer ones. Conflicts: TOOLS/zsh.pl
This commit is contained in:
1 parent
6cf2f634b3
commit
25a0709972
1 file changed
+9
@@ -133,5 +133,14 @@ sub parse_opts {
|
||||
push @list, $entry
|
||||
}
|
||||
|
||||
if ($parsing_main_options) {
|
||||
@list = sort {
|
||||
$a =~ /(.*?)\:/; my $ma = $1;
|
||||
$b =~ /(.*?)\:/; my $mb = $1;
|
||||
|
||||
length($mb) <=> length($ma)
|
||||
} @list;
|
||||
}
|
||||
|
||||
return @list;
|
||||
}
|
||||
Reference in new issue
Block a user