add the add_history() call to console.c
authorTero Marttila <terom@fixme.fi>
Tue, 31 Mar 2009 20:33:31 +0300
changeset 95 6bb8ef294689
parent 94 05a96b200d7b
child 96 a07d917adec1
add the add_history() call to console.c
src/console.c
--- a/src/console.c	Tue Mar 31 19:56:18 2009 +0300
+++ b/src/console.c	Tue Mar 31 20:33:31 2009 +0300
@@ -4,6 +4,7 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <readline/readline.h>
+#include <readline/history.h>
 #include <assert.h>
 
 /** The global console state */
@@ -36,6 +37,9 @@
     // invoke the console callback
     if (console->callbacks && console->callbacks->on_line)
         console->callbacks->on_line(line, console->cb_arg);
+    
+    // add to history mechanism
+    add_history(line);
 
     // release the line
     free(line);