From c0cd4cdf78886040528b16fad084a14165a16384 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Sat, 11 Jun 2022 10:14:53 +0100 Subject: Add compgen caching. A list of commands is now stored in $XDG_CACHE_HOME/.cache/tofi-compgen, and regenerated as necessary. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 806ad1c..ee961f8 100644 --- a/src/main.c +++ b/src/main.c @@ -584,7 +584,7 @@ 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.commands = compgen_cached(); compgen_history_sort(&tofi.window.entry.commands, &tofi.window.entry.history); tofi.window.entry.results = string_vec_copy(&tofi.window.entry.commands); log_unindent(); -- cgit v1.2.3