break loop if not isatty

This commit is contained in:
Doug MacEachern 2005-07-21 04:53:27 +00:00
parent a7b4acb4bb
commit f37fc926f5

View File

@ -259,8 +259,13 @@ public abstract class ShellBase
return; return;
} }
if (input == null || input.trim().length() == 0) { if (input == null || input.trim().length() == 0) {
if (!Getline.isTTY()) {
break;
}
else {
continue; continue;
} }
}
try { try {
handleCommand(input); handleCommand(input);
@ -268,8 +273,10 @@ public abstract class ShellBase
break; break;
} }
} }
if (Getline.isTTY()) {
out.println("Goodbye."); out.println("Goodbye.");
} }
}
public void handleCommand(String line) { public void handleCommand(String line) {
String[] args; String[] args;