Created
November 20, 2019 21:16
-
-
Save hdonnay/1de94756b3f67f623e0d090b89608cd5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "strings" | |
qstring:: { | |
value: string | |
output: "'\(value)'" | |
} | |
arg: string | {output:string} | |
cmd: { | |
exe: string | |
argv: [...arg] | |
line: "\(exe) \(_compiled)" | |
_compiled = strings.Join([ (x&string)|x.output for x in argv ], " ") | |
} | |
hello: cmd & { | |
exe: "echo" | |
argv: [ | |
"hello", | |
qstring&{value:"world"}, | |
] | |
} | |
out:: hello.line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment