feather
feather copied to clipboard
Easier piping of string to stdin?
IIUC, the way to write something to a process's stdin is Process.(echo "foobar" |. proc "sha256sum" [] |> collect stdout). The echo will create a process invoking the echo binary -- this seems a bit wasteful. Is there some way of writing a string directly to the standard input of a process? Something like (<<<) : proc -> string -> proc, analogous to the bash here-strings ? Such that the above could be written `Process.(proc "sha256sum" [] <<< "foobar" |> collect stdout_.
That's a great idea! I'll definitely land a PR adding that sort of thing :)