From: Michael D. Lowis Date: Fri, 18 Jan 2019 01:46:44 +0000 (-0500) Subject: fixed fetch rules for finding files in Code directory X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=80c95820ccacfe458dbc21d05737df209a77fa1f;p=projs%2Ftide.git fixed fetch rules for finding files in Code directory --- diff --git a/config.h b/config.h index d8033da..22fcbc8 100644 --- a/config.h +++ b/config.h @@ -120,8 +120,8 @@ static Rule* BuiltinRules[] = { (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 */ diff --git a/src/fetch.c b/src/fetch.c index 4a21868..fbb1f2f 100644 --- a/src/fetch.c +++ b/src/fetch.c @@ -212,8 +212,10 @@ int main(int argc, char** argv) { 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);