CRaSH beta gets flexible command composition

CRaSH 1.0.0-beta15 is just fresh out of the mill and gets an important new feature inspired from shell pipes.

We have added the capability to compose commands through the pipe (|) and the distribution (+) operators (if you find a more appropriate name, don’t hesitate to tell me).

I won’t detail the whole thing but instead give a few explanations, the whole thing is described in the documentation.

Each command is able to consume and produce a stream of node and this capability is described by a Java generic like notation : <C,P> with for consumed and

for produced. By default a command that does not specify anything is considered as <Void,Void>, i.e it does not consume and produce anything.

The pipe operator (|) allows to take the stream produced by a command and pipe it to a command that will consume it (<Void, X> | <X, Void>).

The distribution operator (+) is useful with the pipe operator and it allows to distribute a stream to two commands (<Void, X> | <X, Void> + <X, Void>) or to take the output stream of two commands and combine it in a single output stream (<Void, X> + <Void, X> | <X, Void>).