Allow pipeing of control flow constructs
feat: Allow piping of control flow constructs
BREAKING CHANGE: This should not break anyone's code, as it is purely additive.
perf: impact
This should not change performance. Usability of shell increases, as it removes the need for unnecessary temporary variables. This makes user code marginally more maintainable, as it should remove boilerplate code.
code: input
let x = 0
while test $x -le 5; echo $xl; let x += 1; end | grep 2
if true; echo "foo"; else; echo "bar"; end > output.txt
cat output
expect: output
2
foo
reason: Allow more complicated operations. This would include creating and filtering a loop, then outputting it to a file. This would make the language more consistent and functional (as in the paradigm).
behavior of bash/dash/zsh/fish/oil bash and zsh have this functionality.