Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] fix/simplify is-at-least



> Removing the leading text in both arguments may be a good compromise to remain closer to the current version.

Well, actually I did so in my first draft, but reconsidered that
the simpler the better.

Do we really need this? (patch against my previous patch: workers/54335).

Given that Zsh versions no longer have leading text for a very long time, probably very few people, if any, would notice any change but dropping any leading text may have an advantage, see below.
 
+# Compatibility with older version:
+# If a segment is of the form 'text123', remove the leading 'text'.
+# Segments like 'text123moretext' are not modified.

I would have left the bolded part out. It leads to an implementation where segments are always compared using integer sorting. Lexical sorting is only used for any trailing text. That's easy to understand. Probably slightly easier than your first version where segments are compared with lexical sorting if one or both start with a non-digit character.

Philippe



Messages sorted by: Reverse Date, Date, Thread, Author