]> git.mdlowis.com Git - projs/tide.git/commitdiff
fixed fetch rules for finding files in Code directory
authorMichael D. Lowis <mike.lowis@gentex.com>
Fri, 18 Jan 2019 01:46:44 +0000 (20:46 -0500)
committerMichael D. Lowis <mike.lowis@gentex.com>
Fri, 18 Jan 2019 01:46:44 +0000 (20:46 -0500)
config.h
src/fetch.c

index d8033da00165168bc7745ade0d5e405271acd49e..22fcbc8d5305cbb0c5f9dab3c80d4805876fea61 100644 (file)
--- 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 */
index 4a218684a1d3525fddf344b386fc291b391765b4..fbb1f2f075f87eaa5429de5c22e1e0fe71edeb87 100644 (file)
@@ -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);