Here's the commit that added the feature to coreutils:
commit 4c9fae4e97d95a9f89d1399a8aeb03051f0fec96
Author: Bruce Korb <[email protected]>
Date: Thu Aug 14 06:24:59 2008 -0700
sort: new option, --sort=version, for version number ordering
* src/sort.c [struct keyfield] (version): New member.
(usage): Describe --version-sort.
(sort_options): Add 'V'.
(long_options): Add "version-sort".
(CHECK_TABLE, _ct_, SORT_TABLE, _st_): Define new macros.
(check_args, sort_args, sort_types): Use these new macros in declarations.
(ARGMATCH_VERIFY): Remove use. No longer needed.
(compare_version): New function.
(key_compare): Add a case.
(check_ordering_compatibility): Handle new type.
(main): Likewise. Reformat two expressions for readability.
* tests/misc/sort-version: new test file
* tests/Makefile.am: add it to the list
* doc/coreutils.texi (sort invocation): Document it.
* NEWS: Mention the new feature.
On Wed, Nov 20, 2024 at 2:12 PM Russell Senior
<[email protected]> wrote:
>
> ... I learned about sort -V in GNU coreutils. I am responsible for the
> -g option from back in the 1990s, but after beating my head against a
> wall to sort on a three segment version number enough to actually
> read-the-fine-manual, I happened across the -V option to sort on
> version numbers, which did exactly what I needed.
>
> Just thought I'd share my delight.
>
> --
> Russell Senior
> [email protected]