summaryrefslogtreecommitdiff
path: root/src/main_compgen.c
diff options
context:
space:
mode:
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);
+}