From 9e8af9d25106b615dabf956305f4ef80496ed412 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Sun, 24 Jul 2022 12:31:09 +0100 Subject: Add drun mode. This is a pretty simple implementation, but it should work for most use cases. Notably, generic application names aren't used (though that could be added without too much hassle), and neither are keywords (that would be more difficult). --- src/compgen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/compgen.c') diff --git a/src/compgen.c b/src/compgen.c index f656f32..b4bcc4c 100644 --- a/src/compgen.c +++ b/src/compgen.c @@ -12,7 +12,7 @@ #include "string_vec.h" #include "xmalloc.h" -static const char *default_state_dir = ".cache"; +static const char *default_cache_dir = ".cache"; static const char *cache_basename = "tofi-compgen"; [[nodiscard("memory leaked")]] @@ -26,7 +26,7 @@ static char *get_cache_path() { return NULL; } size_t len = strlen(home) + 1 - + strlen(default_state_dir) + 1 + + strlen(default_cache_dir) + 1 + strlen(cache_basename) + 1; cache_name = xmalloc(len); snprintf( @@ -34,7 +34,7 @@ static char *get_cache_path() { len, "%s/%s/%s", home, - default_state_dir, + default_cache_dir, cache_basename); } else { size_t len = strlen(state_path) + 1 -- cgit v1.2.3