Index: /trunk/Ohana/src/opihi/cmd.basic/quit.c
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/quit.c	(revision 14448)
+++ /trunk/Ohana/src/opihi/cmd.basic/quit.c	(revision 14449)
@@ -12,4 +12,10 @@
   } 
 
+// the libedit version of readline does not support an incremental write to history file
+# ifndef RL_READLINE_VERSION
+  history = get_variable("HISTORY");
+  if (history != NULL) write_history (history);
+# endif
+
   exit (state);
 
Index: /trunk/Ohana/src/opihi/lib.shell/CommandOps.c
===================================================================
--- /trunk/Ohana/src/opihi/lib.shell/CommandOps.c	(revision 14448)
+++ /trunk/Ohana/src/opihi/lib.shell/CommandOps.c	(revision 14449)
@@ -1,3 +1,8 @@
 # include "opihi.h"
+
+// if the user has installed the libedit version of readline, we need to modify a couple symbols:
+# ifndef RL_READLINE_VERSION
+# define rl_completion_matches(A,B) completion_matches(A,B)
+# endif
 
 static Command  *commands;
@@ -118,6 +123,7 @@
   matches = (char **) NULL;
   
-  if (start == 0)
+  if (start == 0) {
     matches = rl_completion_matches (text, command_generator);
+  }
 
   return (matches);
Index: /trunk/Ohana/src/opihi/lib.shell/opihi.c
===================================================================
--- /trunk/Ohana/src/opihi/lib.shell/opihi.c	(revision 14448)
+++ /trunk/Ohana/src/opihi/lib.shell/opihi.c	(revision 14449)
@@ -41,5 +41,10 @@
       status = multicommand (line);
       add_history (line);
+
+// the libedit version of readline does not support an incremental write to history file
+# ifdef RL_READLINE_VERSION
       if (history != NULL) append_history (1, history);
+# endif
+
     }
     free (line);
