From a3419e2619d896b2902eb4043ceb759b0f5f3bb4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Am=C3=A9lia=20Coutard-Sander?= Date: Sun, 12 Jan 2025 03:55:41 +0100 Subject: [PATCH] =?utf8?q?Compl=C3=A9tions=20dans=20l'ordre=20alphab=C3=A9?= =?utf8?q?tique?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/modes.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/modes.ml b/bin/modes.ml index d9641f9..cb347c7 100644 --- a/bin/modes.ml +++ b/bin/modes.ml @@ -107,6 +107,7 @@ module rec Command : (Mode with type initer = string) = struct aux (len - 1) len let real_complete cmd completions = + let completions = List.sort (fun x y -> compare y x) completions in let last = last cmd in match List.filter (String.starts_with ~prefix:last) completions with | [] -> (String.concat " " (List.map Parse.shquote cmd), []) -- 2.46.0