From 7c31982244f179cb2f51bb1d81b21ad4efd649ba Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Fri, 10 Jun 2022 19:36:29 +0100 Subject: 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. --- src/main_compgen.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/main_compgen.c (limited to 'src/main_compgen.c') 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 +#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); +} -- cgit v1.2.3