Blob
Date:
Sun Jul 18 10:25:43 2021 UTC
Message:
add descr. to completions ; filter by descr. too
BEGIN {
FS = "[(,)]";
print "#include \"telescope.h\""
print "#include \"cmd.h\""
print "struct cmd cmds[] = {";
}
/^CMD/ {
s = $2;
sub("^cmd_", "", s);
gsub("_", "-", s);
printf("\t{ \"%s\", %s, %s },\n", s, $2, $3);
next;
}
/^DEFALIAS/ {
s = $2;
d = $3;
printf("\t{ \"%s\", %s, NULL },\n", s, d);
next
}
{
next;
}
END {
printf("\t{ NULL, NULL, NULL },\n");
print "};";
}
Omar Polo