1 2 3 4 5 6 7 8 9 10 11 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); }