this.shell = shell;
if (shell instanceof DefaultShell) {
DefaultShell sh = (DefaultShell) shell;
sh.setErrorHandler(wrapErrorHandler(sh.getErrorHandler()));
}
this.io = new IO(new NoCloseInputStream(System.in),
new NoCloseOutputStream(System.out),
new NoCloseOutputStream(System.err));
this.env = new DefaultEnvironment(new ProxyIO());
}