Index: trunk/FACT++/src/Console.cc
===================================================================
--- trunk/FACT++/src/Console.cc	(revision 10304)
+++ trunk/FACT++/src/Console.cc	(revision 10305)
@@ -16,4 +16,6 @@
 
 #include "tools.h"
+
+#include "ReadlineColor.h"
 
 using namespace std;
@@ -45,4 +47,49 @@
     fLogO.Display();
     fLogI.Display();
+}
+
+// --------------------------------------------------------------------------
+//
+//! Wrapper to call the correspnding function from ReadlineColor
+//
+bool Console::PrintGeneralHelp()
+{
+    return ReadlineColor::PrintGeneralHelp(fLogI, GetName());
+}
+
+// --------------------------------------------------------------------------
+//
+//! Wrapper to call the correspnding function from ReadlineColor
+//
+bool Console::PrintCommands()
+{
+    return ReadlineColor::PrintCommands(fLogI);
+}
+
+// --------------------------------------------------------------------------
+//
+//! Wrapper to call the correspnding function from ReadlineColor
+//
+bool Console::PrintKeyBindings()
+{
+    return ReadlineColor::PrintKeyBindings(fLogI);
+}
+
+// --------------------------------------------------------------------------
+//
+//! Processes the command provided by the Shell-class.
+//!
+//! @returns
+//!    whether a command was successfully processed or could not be found
+//
+bool Console::Process(const string &str)
+{
+    if (ReadlineColor::Process(fLogI, str))
+        return true;
+
+    if (Readline::Process(str))
+        return true;
+
+    return false;
 }
 
@@ -90,19 +137,4 @@
 }
 
-/*
-// --------------------------------------------------------------------------
-//
-//! Flush the buffer before it is filled with contents produced by the
-//! command processing. This keeps things as seperated as possible,
-//! although there is no gurantee.
-//
-void Console::Shutdown(const char *)
-{
-    // Flush the buffer (after readline() returned, before processing commands)
-    fLog.Display(true);
-    // std::cout << std::endl;
-}
-*/
-
 // --------------------------------------------------------------------------
 //
@@ -114,5 +146,7 @@
 void Console::Run(const char *)
 {
-    // Flush the buffer before we stat out readline loop
+    ReadlineColor::PrintBootMsg(fLogI, GetName());
+
+    // Flush the buffer before we start out readline loop
     fLogI.Display(true);
     fLogO.Display(true);
Index: trunk/FACT++/src/Console.h
===================================================================
--- trunk/FACT++/src/Console.h	(revision 10304)
+++ trunk/FACT++/src/Console.h	(revision 10305)
@@ -16,7 +16,9 @@
     ~Console();
 
+    // Console
     void SetContinous(bool cont) { fContinous = cont; }
     bool IsContinous() const { return fContinous; }
 
+    // I/O
     WindowLog &GetStreamOut() { return fLogO; }
     WindowLog &GetStreamIn()  { return fLogI; }
@@ -25,9 +27,15 @@
     const WindowLog &GetStreamIn()  const { return fLogI; }
 
+    // Readline
+    bool PrintGeneralHelp();
+    bool PrintCommands();
+    bool PrintKeyBindings();
+
+    bool Process(const std::string &str);
+
     std::string GetLinePrompt() const;
 
     void Startup();
     void EventHook();
-    //void Shutdown(const char * =0);
     void Run(const char * = 0);
 };
Index: trunk/FACT++/src/Shell.cc
===================================================================
--- trunk/FACT++/src/Shell.cc	(revision 10304)
+++ trunk/FACT++/src/Shell.cc	(revision 10305)
@@ -425,174 +425,4 @@
 // --------------------------------------------------------------------------
 //
-//! This wrapt the given readline function into a redirection to a file,
-//! which contents is then displayed afterwards in the input panel.
-//!
-//! For convinience the given title is printed in bold before the list.
-//!
-//! This allows to show some readline output in the panel.
-//!
-//! @param function
-//!    Takes a function of type bool(*)() as argument
-//!
-//! @param title
-//!    A title streamed in bold before the output starts
-//!
-//! @returns
-//!    The return value of the function
-//
-bool Shell::RedirectionWrapper(bool (*function)(), const char *title)
-{
-    FILE *save = SetStreamOut(tmpfile());
-    const bool rc = function();
-    FILE *file = SetStreamOut(save);
-
-    const bool empty = ftell(file)==0;
-
-    rewind(file);
-
-    win << endl;
-    win << kBold << title << endl;
-
-    if (empty)
-    {
-        win << " <empty>" << endl;
-        fclose(file);
-        return rc;
-    }
-
-    while (1)
-    {
-        const int c = getc(file);
-        if (feof(file))
-            break;
-        win << (char)c;
-    }
-    win << endl;
-
-    fclose(file);
-
-    return rc;
-}
-
-// --------------------------------------------------------------------------
-//
-//! Can be overwritten to display user defined commands when the command
-//! c is issued.
-//!
-//! @returns
-//!    always true
-//
-bool Shell::PrintCommands()
-{
-    win << endl;
-    win << " " << kUnderline << " Commands:" << endl;
-    win << "   No application specific commands defined." << endl;
-    win << endl;
-
-    return true;
-}
-
-// --------------------------------------------------------------------------
-//
-//! Displays the available ncurses attributes, like color.
-//!
-//! @returns
-//!    always true
-//
-bool Shell::PrintAttributes()
-{
-    //ostream &win = wout;
-    win << endl;
-    win << " Attributes:" << endl;
-    win << "   " << kReset      << "kReset" << endl;
-    win << "   " << kNormal     << "kNormal" << endl;
-    win << "   " << kHighlight  << "kHighlight" << endl;
-    win << "   " << kReverse    << "kReverse" << endl;
-    win << "   " << kUnderline  << "kUnderline" << endl;
-    win << "   " << kBlink      << "kBlink" << endl;
-    win << "   " << kDim        << "kDim" << endl;
-    win << "   " << kBold       << "kBold" << endl;
-    win << "   " << kProtect    << "kProtect" << endl;
-    win << "   " << kInvisible  << "kInvisible" << endl;
-    win << "   " << kAltCharset << "kAltCharset" << kReset << "  (kAltCharset)" << endl;
-    win << endl;
-    win << " Colors:" << endl;
-    win << "   " << kDefault << "kDefault  " << kBold << "+  kBold" << endl;
-    win << "   " << kRed     << "kRed      " << kBold << "+  kBold" << endl;
-    win << "   " << kGreen   << "kGreen    " << kBold << "+  kBold" << endl;
-    win << "   " << kYellow  << "kYellow   " << kBold << "+  kBold" << endl;
-    win << "   " << kBlue    << "kBlue     " << kBold << "+  kBold" << endl;
-    win << "   " << kMagenta << "kMagenta  " << kBold << "+  kBold" << endl;
-    win << "   " << kCyan    << "kCyan     " << kBold << "+  kBold" << endl;
-    win << "   " << kWhite   << "kWhite    " << kBold << "+  kBold" << endl;
-    win << "   " << endl;
-
-    return true;
-}
-
-// --------------------------------------------------------------------------
-//
-//! Displays the keybindings available due to the Shell class
-//!
-//! @returns
-//!    always true
-//!
-//! @todo
-//!    Update output
-//
-bool Shell::PrintKeyBindings()
-{
-    win << endl;
-    win << " " << kUnderline << "Key bindings:" << endl;
-    win << kBold << "   Page-up         " << kReset << "Search backward in history" << endl;
-    win << kBold << "   Page-dn         " << kReset << "Search forward in history" << endl;
-    win << kBold << "   Ctrl-left       " << kReset << "One word backward" << endl;
-    win << kBold << "   Ctrl-right      " << kReset << "One word forward" << endl;
-    win << kBold << "   Ctrl-y          " << kReset << "Delete line" << endl;
-    win << kBold << "   Alt-end/Ctrl-k  " << kReset << "Delete until the end of the line" << endl;
-    win << kBold << "   F1              " << kReset << "Toggle visibility of upper panel" << endl;
-    win << endl;
-    win << " Default key-bindings are identical with your bash." << endl;
-    win << endl;
-
-    return true;
-}
-
-// --------------------------------------------------------------------------
-//
-//! Print a general help text which also includes the commands pre-defined
-//! by the Shell class.
-//!
-//! @returns
-//!    always true
-//!
-//! @todo
-//!    Get it up-to-date
-//
-bool Shell::PrintGeneralHelp()
-{
-    win << endl;
-    win << " " << kUnderline << "General help:" << endl;
-    win << kBold << "   h,help       " << kReset << "Print this help message" << endl;
-    win << kBold << "   clear        " << kReset << "Clear history buffer" << endl;
-    win << kBold << "   lh,history   " << kReset << "Dump the history buffer to the screen" << endl;
-    win << kBold << "   v,variable   " << kReset << "Dump readline variables" << endl;
-    win << kBold << "   f,function   " << kReset << "Dump readline functions" << endl;
-    win << kBold << "   m,funmap     " << kReset << "Dump readline funmap" << endl;
-    win << kBold << "   c,command    " << kReset << "Dump available commands" << endl;
-    win << kBold << "   k,keylist    " << kReset << "Dump key bindings" << endl;
-    win << kBold << "   a,attrs      " << kReset << "Dump available stream attributes" << endl;
-    win << kBold << "   .q,quit      " << kReset << "Quit" << endl;
-    win << endl;
-    win << " The command history is automatically loaded and saves to" << endl;
-    win << " and from " << GetName() << endl;
-    win << endl;
-
-    return true;
-}
-
-
-// --------------------------------------------------------------------------
-//
 //! Processes the command provided by the Shell-class.
 //!
@@ -607,25 +437,9 @@
     //  int rl_add_defun (const char *name, rl_command_func_t *function, int key)
 
-    // ----------- Readline -----------
-
-    if (str=="lh" || str=="history")
-        return RedirectionWrapper(DumpHistory, "History:");
-
-    if (str=="v" || str=="variable")
-        return RedirectionWrapper(DumpVariables, "Variables:");
-
-    if (str=="f" || str=="function")
-        return RedirectionWrapper(DumpFunctions, "Functions:");
-
-    if (str=="m" || str=="funmap")
-        return RedirectionWrapper(DumpFunmap, "Funmap:");
+    if (ReadlineColor::Process(win, str))
+        return true;
 
     if (Readline::Process(str))
         return true;
-
-    // ------------ ReadlineWindow -------------
-
-    if (str=="a" || str=="attrs")
-        return PrintAttributes();
 
     // ----------- ReadlineNcurses -----------
Index: trunk/FACT++/src/Shell.h
===================================================================
--- trunk/FACT++/src/Shell.h	(revision 10304)
+++ trunk/FACT++/src/Shell.h	(revision 10305)
@@ -3,4 +3,5 @@
 
 #include "ReadlineWindow.h"
+#include "ReadlineColor.h"
 #include "WindowLog.h"
 
@@ -42,9 +43,4 @@
     void HandleResize();
 
-    // Wrapper function to redirect the output of some readline function
-    // into our own stream
-    bool RedirectionWrapper(bool (*function)(), const char *title);
-    bool PrintAttributes();  /// Show the available attributes
-
     /// Helper for the constructor and window resizing to create the windows and panels
     void CreateWindows(WINDOW *w[3], int all=true);
@@ -61,9 +57,15 @@
     void Refresh() { ShowHide(-2); }
 
-    bool PrintGeneralHelp();
-    bool PrintCommands();
-    bool PrintKeyBindings();
+    bool PrintGeneralHelp() { return ReadlineColor::PrintGeneralHelp(win, GetName()); }
+    bool PrintCommands()    { return ReadlineColor::PrintCommands(win);    }
+    bool PrintKeyBindings() { return ReadlineColor::PrintKeyBindings(win); }
 
     bool Process(const std::string &str);
+
+    void Run(const char * = "")
+    {
+        ReadlineColor::PrintBootMsg(win, GetName());
+        Readline::Run();
+    }
 
     WindowLog &GetStreamOut() { return wout; }
