]> gitweb.factorcode.org Git - factor.git/commitdiff
backticks: use interpolate to allow parameterized commands.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 20 Apr 2015 22:48:56 +0000 (15:48 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 20 Apr 2015 22:48:56 +0000 (15:48 -0700)
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! ;