]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/backticks/backticks.factor
backticks: use interpolate to allow parameterized commands.
[factor.git] / extra / backticks / backticks.factor
index 4f5104781989c71594875a5a15eb54d9c46da588..dc0643316fafe8118b3d802e2a30ad518923c53a 100644 (file)
@@ -1,9 +1,11 @@
 ! Copyright (C) 2015 John Benediktsson
 ! See http://factorcode.org/license.txt for BSD license
-USING: fry io io.encodings.utf8 io.launcher multiline sequences ;
+USING: fry io io.encodings.utf8 interpolate io.launcher
+multiline sequences ;
 IN: backticks
 
 SYNTAX: `
-    "`" parse-multiline-string
-    '[ _ utf8 [ contents ] with-process-reader ]
-    append! ;
+    "`" parse-multiline-string '[
+        _ interpolate>string
+        utf8 [ contents ] with-process-reader
+    ] append! ;