diff command.c @ 34987:bdf9478e9374

Change "run" command to expand properties. Patch by Jan Christoph Uhde [Jan UhdeJc com], documentation part changed by me.
author reimar
date Sun, 12 Aug 2012 17:57:35 +0000
parents 26eddbd6353a
children 77a90f0b02b1
line wrap: on
line diff
--- a/command.c	Sun Aug 12 17:31:47 2012 +0000
+++ b/command.c	Sun Aug 12 17:57:35 2012 +0000
@@ -3346,7 +3346,11 @@
         case MP_CMD_RUN:
 #ifndef __MINGW32__
             if (!fork()) {
-                execl("/bin/sh", "sh", "-c", cmd->args[0].v.s, NULL);
+                char *exp_cmd = property_expand_string(mpctx, cmd->args[0].v.s);
+                if (exp_cmd) {
+                    execl("/bin/sh", "sh", "-c", exp_cmd, NULL);
+                    free(exp_cmd);
+                }
                 exit(0);
             }
 #endif