mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-15 22:51:13 -03:00
Introduce a -k/--keep-order switch to `complete` that can be used to prevent fish from sorting/re-ordering the results provided by a completion source. In addition, this patch does so without doing away with deduplication of completions by introducing a new unique_unsorted(..) helper function that removes duplicates in-place without affecting the general order of the vector/container. Note that the code now uses a stable sort for completions, since the behavior of is_naturally_less_than as of this patch now means that the results are not necessarily _actually_ identical just because that function repeatedly returns false for any ordering of any given two elements. Fixes #361
8.1 KiB
8.1 KiB