summaryrefslogtreecommitdiff
path: root/src/main_compgen.c
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-06-10 19:36:29 +0100
committerPhil Jones <philj56@gmail.com>2022-06-10 19:36:29 +0100
commit7c31982244f179cb2f51bb1d81b21ad4efd649ba (patch)
tree07c612f81b6b5a15aa2c0587fdee7077ceaeba36 /src/main_compgen.c
parenta6ac47fb763fd4448c0269e274f061226fa0f10a (diff)
Various small changes.
- Split the compgen and history sorting parts of compgen(), for future dmenu-like work. - Add a separate tofi-compgen executable. - Remove harfbuzz-glib usage, as we shouldn't be doing any complicated unicode stuff.
Diffstat (limited to 'src/main_compgen.c')
-rw-r--r--src/main_compgen.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main_compgen.c b/src/main_compgen.c
new file mode 100644
index 0000000..a62bc11
--- /dev/null
+++ b/src/main_compgen.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+#include "compgen.h"
+#include "string_vec.h"
+
+int main()
+{
+ struct string_vec commands = compgen();
+ for (size_t i = 0; i < commands.count; i++) {
+ printf("%s\n", commands.buf[i]);
+ }
+ string_vec_destroy(&commands);
+}