summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
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");