}
return;
}
ConsoleReader reader = new ConsoleReader();
if (!sessionState.batch)
{
reader.addCompletor(completer);
reader.setBellEnabled(false);
String historyFile = System.getProperty("user.home") + File.separator + HISTORYFILE;
try
{
History history = new History(new File(historyFile));
reader.setHistory(history);
}
catch (IOException exp)
{
sessionState.err.printf("Unable to open %s for writing %n", historyFile);
}
}
else if (!sessionState.verbose) // if in batch mode but no verbose flag
{
sessionState.out.close();
}
cliClient.printBanner();
String prompt;
String line = "";
String currentStatement = "";
boolean inCompoundStatement = false;
while (line != null)
{
prompt = (inCompoundStatement) ? "...\t" : getPrompt(cliClient);
try
{
line = reader.readLine(prompt);
}
catch (IOException e)
{
// retry on I/O Exception
}