From 7c31982244f179cb2f51bb1d81b21ad4efd649ba Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Fri, 10 Jun 2022 19:36:29 +0100 Subject: Various small changes. - Split the compgen and history sorting parts of compgen(), for future dmenu-like work. - Add a separate tofi-compgen executable. - Remove harfbuzz-glib usage, as we shouldn't be doing any complicated unicode stuff. --- src/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 63d8252..806ad1c 100644 --- a/src/main.c +++ b/src/main.c @@ -584,7 +584,8 @@ int main(int argc, char *argv[]) log_debug("Generating command list.\n"); log_indent(); tofi.window.entry.history = history_load(); - tofi.window.entry.commands = compgen(&tofi.window.entry.history); + tofi.window.entry.commands = compgen(); + compgen_history_sort(&tofi.window.entry.commands, &tofi.window.entry.history); tofi.window.entry.results = string_vec_copy(&tofi.window.entry.commands); log_unindent(); log_debug("Command list generated.\n"); -- cgit v1.2.3