Index: /trunk/FACT++/src/Readline.cc
===================================================================
--- /trunk/FACT++/src/Readline.cc	(revision 13712)
+++ /trunk/FACT++/src/Readline.cc	(revision 13713)
@@ -1166,17 +1166,24 @@
 //
 //! Process a single line. All lines are added to the history, but only
-//! accepted lines are written to the command log. Inthis case fLine is
+//! accepted lines are written to the command log. In this case fLine is
 //! increased by one.
+//! Comment (starting with #) are removed from the command-line. A # can be
+//! escaped with quotation marks "#"
 //
 void Readline::ProcessLine(const string &str)
 {
-    const bool rc = PreProcess(str);
-
-    AddToHistory(str);
-
-    if (rc)
-        return;
-
-    fLine++;
+    const string cmd = Tools::Uncomment(str);
+
+    if (!cmd.empty())
+    {
+        const bool rc = PreProcess(cmd);
+
+        AddToHistory(cmd);
+
+        if (rc)
+            return;
+
+        fLine++;
+    }
 
     fCommandLog << str << endl;
Index: /trunk/FACT++/src/tools.cc
===================================================================
--- /trunk/FACT++/src/tools.cc	(revision 13712)
+++ /trunk/FACT++/src/tools.cc	(revision 13713)
@@ -192,2 +192,15 @@
     return rc;
 }
+
+// --------------------------------------------------------------------------
+//
+//! Returns the string with a comment (introduced by a #) stripped. The
+//! comment mark can be escaped by either \# or "#"
+//!
+string Tools::Uncomment(const string &opt)
+{
+    using namespace boost;
+    typedef escaped_list_separator<char> separator;
+
+    return *tokenizer<separator>(opt, separator('\\', '#', '\"')).begin();
+}
Index: /trunk/FACT++/src/tools.h
===================================================================
--- /trunk/FACT++/src/tools.h	(revision 13712)
+++ /trunk/FACT++/src/tools.h	(revision 13713)
@@ -14,4 +14,5 @@
 
     std::map<std::string,std::string> Split(std::string &);
+    std::string Uncomment(const std::string &opt);
 }
 
