Hi Jason, Jason McIntyre wrote on Thu, Mar 27, 2025 at 03:00:12PM +0000: > On Thu, Mar 27, 2025 at 01:55:29PM +0100, Ingo Schwarze wrote:
[...] >> The following wording tweak would resolve both issues, both making >> 1-based numbering explicit and avoiding the singular/plural quibble: >> >> such that every odd-numbered substring including the first one >> consists of non-digit characters only, >> > or you could just change your orginal text to "the first and every > otheri odd-numbered" i suppose. That works, too, so i committed this version. >> Like in the patch below? >> >> It feels slightly wordy, any idea how to bring the point across more >> concisely? > i don;t, because the accompanyting text for sort -V is so massive that > my eyes begin to glaze over. i would sacrifice precision and detail for > simplicity here i think, but i realise that may be unsatisfactory. Indeed, i do think whoever designed -V did a rather poor job. The purpose indicated by the name of the option ("version ordering") is much too narrow to warrant its own option. The actual implementation is much broader than the naming suggests and very poorly orthogonalized to the rest of the command line interface. The logic implemented is overly complicated, violating the Unix principle "do one simple thing, and do it well", instead doing something that is at the same time excessively specific and excessively complicated. And now we are stuck with having to document the mess, and users are stuck with either trawling through the substantial amount of text or just irgnoring the option altogether. Then again, even an ill-designed feature can occasionally by useful by mere chance (as witnessed by pascal@'s original comment "-V to the rescue"). Besides, if we support something, we usually want to document it. > i do have a suggestion for your text though (inline): I agree that reads better, so i committed your morse code suggestion. Thanks, Ingo >> Index: sort.1 >> =================================================================== >> RCS file: /cvs/src/usr.bin/sort/sort.1,v >> diff -u -r1.67 sort.1 >> --- sort.1 27 Mar 2025 11:43:58 -0000 1.67 >> +++ sort.1 27 Mar 2025 12:46:22 -0000 >> @@ -201,8 +201,8 @@ >> IPv4 addresses in dotted quad notation. >> .Pp >> When comparing two strings, both strings are split into substrings >> -such that the first and every odd-numbered substring >> -consist of non-digit characters only, >> +such that every odd-numbered substring including the first one >> +consists of non-digit characters only, >> while every even-numbered substring consists of digits only. >> These substrings are compared in turn from left to right >> until a difference is found. >> @@ -222,7 +222,11 @@ >> This is intended for ignoring filename suffixes such as >> .Dq .tar.bz2 . >> .Pp >> -For example: >> +In the following example, the first substring is >> +.Qq sort\- >> +and the other odd-numbered substrings are >> +.Qq \&. >> +each: > maybe: are all ".". > > that's starting to look like morse code though... > > jmc >> .Bd -literal -offset indent >> $ ls sort* | sort -V >> sort-1.022.tgz >