options for lsort have no effect when only one list element
Closed / Fixed219202ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 05:03:31
OriginalBugID: 3330 Bug Version: 8.2 SubmitDate: '1999-11-05' LastModified: '1999-11-11' Severity: MED Status: Assigned Submitter: techsupp ChangedBy: hobbs OS: Windows 95 FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: keith lea ReproducibleScript: % lsort -integer f f % DesiredBehavior: i'd rather get an error message! An error would be correct in this case, while the current source just assumes this is a quick noop. -- 11/11/1999 hobbs
dkf Ticket [219202ffff]: 1 change
[History diff]2000-11-08 18:02:45
dkfplain2000-12-01 03:32:29
I don't know whether an error is correct; surely the options just control the nature of the ordering function. No ordering required, all ordering functions are happy. Plus, how could you test in the first place? Calling the ordering function with the same element for both values is a much worse idea, particularly if the ordering function was specified using -command...
dkf Ticket [219202ffff]: 1 change
[History diff]2001-02-07 23:04:43
dkf Ticket [219202ffff]: 1 change
[History diff]2001-02-15 23:27:09
dkfplain2001-02-19 17:07:06
Hmm. This needs a rewrite of the manual page to state that the conversion to integer/float happens as part of the comparison, and not prior to the overall sort (which I believe to be the correct behaviour.)
dkfplain2001-03-13 21:54:32
Logged In: YES user_id=79902 Trying to attach a patch that fixes this...
dkfplain2001-03-13 21:56:09
Logged In: YES
user_id=79902
Oh dear, can't attach the patch. Try looking at
http://www.cs.man.ac.uk/~fellowsd/tcl/patch/lsortdoc.patch
instead.
dkfplain2001-03-13 22:19:59
Logged In: YES user_id=79902 I really meant to say: http://www.cs.man.ac.uk/~fellowsd/tcl/patches/lsortdoc.patch (I think I can see why uploading patches is not entirely evil, since then at least the links don't get broken by stupid typos... :^)
dkfplain2001-03-23 20:24:27
File Added - 4552: lsortdoc.patch Logged In: YES user_id=79902 Trying to upload the patch here...
dkf Closed ticket [219202ffff].
[History diff]2001-03-29 20:17:51
Log in (anonymous is fine) to add a comment.
Attachments:
- lsortdoc.patch [download] added by dkf on 2001-03-23 20:24:27. [details]