mirror of
https://github.com/curl/curl.git
synced 2026-04-29 11:22:12 +03:00
cmdline/gen: fix the sorting of the man page options
They were previously sorted based on the file names, which use a .d extension, making "data" get placed after "data-binary" etc. Making the sort ignore the extention fixes the ordering. Reported-by: Boris Verkhovskiy Bug: https://curl.se/mail/archive-2023-12/0014.html Closes #12494
This commit is contained in:
parent
d65b8868c6
commit
9fa8652fd5
1 changed files with 11 additions and 1 deletions
|
|
@ -675,6 +675,16 @@ sub listglobals {
|
|||
}
|
||||
}
|
||||
|
||||
sub noext {
|
||||
my $in = $_[0];
|
||||
$in =~ s/\.d//;
|
||||
return $in;
|
||||
}
|
||||
|
||||
sub sortnames {
|
||||
return noext($a) cmp noext($b);
|
||||
}
|
||||
|
||||
sub mainpage {
|
||||
my (@files) = @_;
|
||||
my $ret;
|
||||
|
|
@ -682,7 +692,7 @@ sub mainpage {
|
|||
header("page-header");
|
||||
|
||||
# output docs for all options
|
||||
foreach my $f (sort @files) {
|
||||
foreach my $f (sort sortnames @files) {
|
||||
$ret += single($f, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue