Arc Forumnew | comments | leaders | submitlogin
1 point by mascarenhas 6168 days ago | link | parent

I don't have an arc prompt to try this right now, but wouldn't (rmeol:system:string "echo" "hi") do the same? If this is too verbose you can do (def ssystem system:string), I think.


2 points by CatDancer 6168 days ago | link

Not quite: you need tostring to capture the output of system (which is sent to stdout, not returned as a string). tostring is macro, so you can't compose it using :.

If I thought of a shorter name than "rmeol/ssystem" that I would still understand to mean "concatenate strings together, pass to system, capture the output, and remove the trailing newline", I would use it instead of "rmeol:ssystem". If "rmeol/ssystem" is the best I can come up with, then hey, I can save myself a function def and use "rmeol:ssystem". :-)

-----