backticks: adding backtick syntax experiment.
parent
12f87c2678
commit
24de8af6e5
|
@ -0,0 +1 @@
|
|||
John Benediktsson
|
|
@ -0,0 +1,12 @@
|
|||
USING: help.markup help.syntax io.encodings.utf8 strings ;
|
||||
IN: backticks
|
||||
|
||||
HELP: `
|
||||
{ $syntax "` command [args]`" }
|
||||
{ $description "Runs the specified command and captures the output as a " { $link utf8 } " encoded " { $link string } "." }
|
||||
{ $examples
|
||||
{ $unchecked-example
|
||||
"` ls -l`"
|
||||
"total 45\ndrwxrwxr-x+ 61 root admin 2074 Apr 8 22:58 Applic..."
|
||||
}
|
||||
} ;
|
|
@ -0,0 +1,10 @@
|
|||
! Copyright (C) 2015 John Benediktsson
|
||||
! See http://factorcode.org/license.txt for BSD license
|
||||
USING: fry io io.encodings.utf8 io.launcher multiline sequences
|
||||
unicode.categories ;
|
||||
IN: backticks
|
||||
|
||||
SYNTAX: `
|
||||
"`" parse-multiline-string [ blank? ] trim
|
||||
'[ _ utf8 [ contents ] with-process-reader ]
|
||||
append! ;
|
|
@ -0,0 +1 @@
|
|||
Backtick process syntax
|
Loading…
Reference in New Issue