Index: trunk/FACT++/src/Readline.cc
===================================================================
--- trunk/FACT++/src/Readline.cc	(revision 14983)
+++ trunk/FACT++/src/Readline.cc	(revision 14984)
@@ -317,7 +317,7 @@
     }
 
-    const string p = GetUpdatePrompt();
+    string p = GetUpdatePrompt();
     if (p.empty())
-        return;
+        p = rl_prompt;
 
     UpdatePrompt("");
@@ -1262,4 +1262,62 @@
 // --------------------------------------------------------------------------
 //
+//! Writes the current history to the file defined by fName and
+//! replaces the history by the data from the given file.
+//!
+//! @param fname
+//!    Name of the history file to read
+//!
+void Readline::StaticPushHistory(const string &fname="")
+{
+    write_history(This->fName.c_str());
+    stifle_history(0);
+    unstifle_history();
+    read_history(fname.c_str());
+}
+
+// --------------------------------------------------------------------------
+//
+//! Writes the current history to the file with the given name
+//! and replaces the history by the file defined by fName.
+//!
+//! @param fname
+//!    Name of the history file to write (it will be truncated to 1000 lines)
+//!
+void Readline::StaticPopHistory(const string &fname="")
+{
+    write_history(fname.c_str());
+    history_truncate_file(fname.c_str(), 1000);
+    stifle_history(0);
+    unstifle_history();
+    read_history(This->fName.c_str());
+}
+
+// --------------------------------------------------------------------------
+//
+//! Just calls readline and thus allows to just prompt for something.
+//! Adds everything to the history except '.q'
+//!
+//! @param prompt
+//!    Prompt to be displayed
+//!
+//! @return
+//!    String entered by the user ('.q' is Ctrl-d is pressed)
+//!
+string Readline::StaticPrompt(const string &prompt)
+{
+    char *buf = readline(prompt.c_str());
+    if (!buf)
+        return ".q";
+
+    const string str(buf);
+    if (Tools::Trim(str)!=".q")
+        add_history(buf);
+    free(buf);
+
+    return str;
+}
+
+// --------------------------------------------------------------------------
+//
 //! Process a single line. All lines are added to the history, but only
 //! accepted lines are written to the command log. In this case fLine is
Index: trunk/FACT++/src/Readline.h
===================================================================
--- trunk/FACT++/src/Readline.h	(revision 14983)
+++ trunk/FACT++/src/Readline.h	(revision 14984)
@@ -143,4 +143,8 @@
 
     static Readline *Instance() { return This; }
+
+    static void        StaticPushHistory(const std::string &fname);
+    static std::string StaticPrompt(const std::string &prompt);
+    static void        StaticPopHistory(const std::string &fname);
 };
 
