(Rule[]){ /* Look up .c or .h files in Code/ */
{ MATCHES, "data", "\\.[ch]$" },
{ ISDIR, "Code", NULL },
- { EXEC, "[[ $(find Code -type f -name '*$data') ]]", NULL },
- { LAUNCH, "find Code -type f -name '*$data' | xargs -r edit", NULL },
+ { EXEC, "[[ \"$(find Code -type f -name \"*$data\")\" ]]", NULL },
+ { LAUNCH, "find Code -type f -name \"*$data\" | xargs -r edit", NULL },
{ COMPLETE, NULL, NULL }
},
(Rule[]){ /* If it's an existing directory, open it with system default */
for (; rule->type != COMPLETE; rule++) {
if (debug)
printf(" %s '%s' '%s'\n", type2str(rule->type), rule->arg1, rule->arg2);
- if (!apply_rule(rule))
+ if (!apply_rule(rule)) {
+ printf(" FAIL\n");
break;
+ }
}
if (rule->type == COMPLETE)
exit(0);