summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-06-11 10:14:53 +0100
committerPhil Jones <philj56@gmail.com>2022-06-11 10:14:53 +0100
commitc0cd4cdf78886040528b16fad084a14165a16384 (patch)
tree82788f09527c91060cea22246f1af9a2572ce655 /src/main.c
parent7c31982244f179cb2f51bb1d81b21ad4efd649ba (diff)
Add compgen caching.
A list of commands is now stored in $XDG_CACHE_HOME/.cache/tofi-compgen, and regenerated as necessary.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
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();