ConsoleWriter out = (ConsoleWriter) console.getOut();
ConsoleWriter err = (ConsoleWriter) console.getErr();
if (in == null) {
throw new ShellException("console input stream is null");
}
setupStreams(new ShellConsoleReader(in), new ShellConsoleWriter(out),
new ShellConsoleWriter(err));
SystemInputStream.getInstance().initialize(new ReaderInputStream(in));
cons.setCompleter(this);
console.addConsoleListener(this);
aliasMgr = ShellUtils.getAliasManager().createAliasManager();