Here are some pain points before including it in the library
Is | appropriate ?
Pros: concise, already used in shells.
Cons: not as readable as for example >
runGetOutput ditch the line end. This is problematic for piping. Possible solutions :
use run directly ?
Pros: concise
Cons: less explicit
use RemoveLineEnd flag ?
Pros: explicit
Cons: behaviour of runGetOutput is not as reliable. Can be circumvet by decreting runGetOutput always ditch lineEnd no matter the flag. Or by saying internalCmd always ditch lineEnd. Or by using withoutLineEnd explicitly in shellcmd. Etc.
The example syntax is verbose. How much could it be reduced without compromising flexibility and explicitness ?
Should it accept a Future or the awaited result ? How could it play with implicitAsync ?
{.async.} macro makes | macro be called two times (concerns all macros). But this is low priority
It should be a nice feature to have some sort of piping for conciseness, like in bash
echo num | sed s/u/i/
Examples
Here is a working example/proof of concept
Problematics
Here are some pain points before including it in the library
|
appropriate ?>
run
directly ?RemoveLineEnd
flag ?runGetOutput
is not as reliable. Can be circumvet by decreting runGetOutput always ditch lineEnd no matter the flag. Or by saying internalCmd always ditch lineEnd. Or by using withoutLineEnd explicitly in shellcmd. Etc.|
macro be called two times (concerns all macros). But this is low priority