From: Amélia Coutard-Sander Date: Sun, 12 Jan 2025 02:55:41 +0000 (+0100) Subject: Complétions dans l'ordre alphabétique X-Git-Url: https://git.ameliathe1st.gay/?a=commitdiff_plain;h=a3419e2619d896b2902eb4043ceb759b0f5f3bb4;p=cells.git Complétions dans l'ordre alphabétique --- 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), [])