]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
scripts/sortman: Ignore only leading underscores or dashes
authorAlejandro Colomar <alx@kernel.org>
Mon, 14 Aug 2023 13:15:12 +0000 (15:15 +0200)
committerAlejandro Colomar <alx@kernel.org>
Mon, 14 Aug 2023 13:16:59 +0000 (15:16 +0200)
Underscores or dashes in the middle of words should be significant:

man5/procfs.5
man5/proc.5
man5/proc_a.5
man5/proc_z.5

Signed-off-by: Alejandro Colomar <alx@kernel.org>
scripts/sortman

index 566326f422a53656d6e06166c5e605b5acf95d5e..01564fdce0c1df9200ed5edaf002d34c9af68988 100755 (executable)
@@ -7,7 +7,7 @@ sed   -E '/\/intro./  s/.*\.([[:digit:]])/\10\t&/' \
 | sed -E '/\/intro./! s/.*\.([[:digit:]])\>/\11\t&/' \
 | sed -E '/\/intro./! s/.*\.([[:digit:]])([[:alnum:]]+)/\12.\2\t&/' \
 | sed -E '            s/\t(.*)/&\n\1/' \
-| sed -E '/\t/        s/([^[:digit:]])[_-]([^[:digit:]])/\1\2/g' \
+| sed -E '/\t/        s/\/[_-]*/\//g' \
 | sed -E '/\t/        s/[_-]/_/g' \
 | sed -E '/\t/        {N;s/\n/\t/;}' \
 | sort -fV \