1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2026-01-15 01:31:08 +00:00
uutils-coreutils/src/sort
David Laban 6751d2c708 implement sort --stable
Made a new function sort_by(lines, compare_fns), which accepts a
list of compare_fns and calls lines.sort_by() with a closure that
calls each compare_fn in turn until one returns something other
than equal.

Default behavior ensures that String::cmp is the last element in the
compare_fns list (referred to as 'last resort' sorting by man sort).
Passing --stable (-s) turns this behaviour off.

Test cases provided for `sort --month` and `sort --month --stable`.
2016-08-03 07:56:40 +01:00
..
Cargo.toml sort: Version sort support 2016-06-14 20:33:09 +03:00
main.rs Refactor and simplify build for utilities. 2015-12-07 21:56:45 -05:00
sort.rs implement sort --stable 2016-08-03 07:56:40 +01:00