code: protected void pushContext() {
      antOut = System.out;
      antErr = System.err;
      System.setOut(new PrintStream(out));
      System.setErr(out == err ? System.out : new PrintStream(err));
    }
docs: Save the current values of System.out, System.err and configure output
  streams for FsShell.