cash icon indicating copy to clipboard operation
cash copied to clipboard

streaming output

Open calvinmetcalf opened this issue 8 years ago • 0 comments

I was looking into a pull to support the yes command but it doesn't look like cash supports streaming of large output streams, one could simulate the yes command in node pretty easily with something like

function yes(explative) {
    explative = explative || 'y';
    return new stream.Readable({
        read() {
              var moreNeeded = true;
              while (moreNeaded) {
                  this.push(explative);
                  moreNeeded = this.push(os.sep);
             }
          }
    });
}

but as far as I could tell there is no way to output stuff continually async wise so that you could catch signals

calvinmetcalf avatar Mar 22 '16 13:03 calvinmetcalf