summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-06-10 19:36:29 +0100
committerPhil Jones <philj56@gmail.com>2022-06-10 19:36:29 +0100
commit7c31982244f179cb2f51bb1d81b21ad4efd649ba (patch)
tree07c612f81b6b5a15aa2c0587fdee7077ceaeba36 /src/main.c
parenta6ac47fb763fd4448c0269e274f061226fa0f10a (diff)
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.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
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");