Index: trunk/FACT++/src/Readline.cc
===================================================================
--- trunk/FACT++/src/Readline.cc	(revision 15061)
+++ trunk/FACT++/src/Readline.cc	(revision 15064)
@@ -1312,5 +1312,7 @@
     const string str(buf);
     if (Tools::Trim(str)!=".q")
-        add_history(buf);
+        if (history_search_pos(str.c_str(), -1, history_length-1)!=history_length-1)
+            add_history(buf);
+
     free(buf);
 
