summaryrefslogtreecommitdiff
path: root/src/compgen.c
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-07-24 12:31:09 +0100
committerPhil Jones <philj56@gmail.com>2022-07-24 12:40:26 +0100
commit9e8af9d25106b615dabf956305f4ef80496ed412 (patch)
tree180ad86a9c1675777c83a9243db5129a01be9146 /src/compgen.c
parentee0ed3c506f8f45fce42cbabc1d9521382740924 (diff)
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).
Diffstat (limited to 'src/compgen.c')
-rw-r--r--src/compgen.c6
1 files changed, 3 insertions, 3 deletions
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