added support for ctrl-l and clear command into redis-cli. To clear the screen is a good idea from time to time :). Also linenoise updated to the current version to support this new feature.

This commit is contained in:
antirez
2010-12-01 11:18:59 +01:00
parent ce260f736e
commit bbac56c2f8
3 changed files with 25 additions and 0 deletions

View File

@ -561,6 +561,8 @@ static void repl() {
config.hostip = sdsnew(argv[1]);
config.hostport = atoi(argv[2]);
cliConnect(1);
} else if (argc == 1 && !strcasecmp(argv[0],"clear")) {
linenoiseClearScreen();
} else {
long long start_time = mstime(), elapsed;