From: SVN by r. <sv...@ca...> - 2007-10-08 09:49:50
|
Author: rotman Date: 2007-10-08 11:49:45 +0200 (Mon, 08 Oct 2007) New Revision: 164 Modified: ChangeLog src/main/java/nl/improved/sqlclient/SQLShell.java Log: Add exit on ^D implementation Modified: ChangeLog =================================================================== --- ChangeLog 2007-10-02 09:57:31 UTC (rev 163) +++ ChangeLog 2007-10-08 09:49:45 UTC (rev 164) @@ -4,6 +4,7 @@ * fix to stop spooled lines being appended to each other. * Improve tab completion for update * NullPointerException fix when not running from jar. + * Quit with ^D (on empty commandline) 0.2 (17-09-2007) * Search in history (for example by entering '/query' to make the current command the last command with query in it) Modified: src/main/java/nl/improved/sqlclient/SQLShell.java =================================================================== --- src/main/java/nl/improved/sqlclient/SQLShell.java 2007-10-02 09:57:31 UTC (rev 163) +++ src/main/java/nl/improved/sqlclient/SQLShell.java 2007-10-08 09:49:45 UTC (rev 164) @@ -278,6 +278,10 @@ cursorPosition.x = 0; } else debug("Unknown character: "+ inp.getCode()); + } else if (inp.toString().equals("")) { //Ctrl+D + if (commandLines.getCommandString().length() == 0) { //Quit on empty commandline, ignore otherwise + new QuitCommand().execute(new SQLCommand()); + } } else { if (inp.getCharacter() == '\n') { // execute the command |