Index: trunk/src/lib/shell/shell.h
===================================================================
--- trunk/src/lib/shell/shell.h	(revision 5242)
+++ trunk/src/lib/shell/shell.h	(revision 5243)
@@ -3,5 +3,4 @@
  * Definition of a on-screen-shell
  *
- * @todo check for smooth deletion process
  * @todo Buffer Display in different Colors for different debug mode.
  */
Index: trunk/src/lib/shell/shell_command.h
===================================================================
--- trunk/src/lib/shell/shell_command.h	(revision 5242)
+++ trunk/src/lib/shell/shell_command.h	(revision 5243)
@@ -2,4 +2,6 @@
  * @file shell_command.h
  * Definition of a on-screen-shell
+ *
+ * @todo also take Static functions
 */
 
Index: trunk/src/lib/shell/shell_input.cc
===================================================================
--- trunk/src/lib/shell/shell_input.cc	(revision 5242)
+++ trunk/src/lib/shell/shell_input.cc	(revision 5243)
@@ -48,5 +48,8 @@
   this->inputLine = new char[1];
   this->inputLine[0] = '\0';
-  this->inputHistory = new tList<char>;
+  this->history = new tList<char>;
+  this->historyIT = this->history->getIterator();
+  this->historyLength = 10;
+  this->historyScrolling = false;
   this->delayed = 0;
   this->setRepeatDelay(.3, .05);
@@ -69,13 +72,12 @@
   delete this->completion;
 
-  tIterator<char>* itH = this->inputHistory->getIterator();
-  char* histEl = itH->firstElement();
+  char* histEl = this->historyIT->firstElement();
   while (histEl != NULL)
   {
     delete[] histEl;
-    histEl = itH->nextElement();
-  }
-  delete itH;
-  delete this->inputHistory;
+    histEl = this->historyIT->nextElement();
+  }
+  delete this->historyIT;
+  delete this->history;
 }
 
@@ -164,5 +166,19 @@
   char* newCommand = new char[strlen(this->inputLine)+1];
   strcpy(newCommand, this->inputLine);
-  this->inputHistory->add(newCommand);
+
+  // removing the eventually added Entry (from scrolling) to the List
+  if (this->historyScrolling)
+  {
+    delete[] this->history->lastElement();
+    this->historyScrolling = false;
+  }
+
+  // adding the new Command to the History
+  this->history->add(newCommand);
+  if (this->history->getSize() > this->historyLength)
+  {
+    delete[] this->history->firstElement();
+    this->history->remove(this->history->firstElement());
+  }
 
   ShellCommandBase::execute(this->inputLine);
@@ -171,4 +187,47 @@
 
   return false;
+}
+
+
+/**
+ * moves one entry up in the history.
+ */
+void ShellInput::historyMoveUp()
+{
+  if (!this->historyScrolling)
+  {
+    char* newCommand = new char[strlen(this->inputLine)+1];
+    strcpy(newCommand, this->inputLine);
+    this->history->add(newCommand);
+    this->historyScrolling = true;
+    this->historyIT->lastElement();
+  }
+
+  char* prevElem = this->historyIT->prevStep();
+  if (prevElem == NULL)
+    return;
+  else
+  {
+    this->flush();
+    this->addCharacters(prevElem);
+  }
+
+}
+
+/**
+ * moves one entry down in the history
+ */
+void ShellInput::historyMoveDown()
+{
+  if (!this->historyScrolling)
+    return;
+  char* nextElem = this->historyIT->nextStep();
+  if (nextElem == NULL)
+    return;
+  else
+  {
+    this->flush();
+    this->addCharacters(nextElem);
+  }
 }
 
@@ -228,4 +287,8 @@
     else if (event.type == SDLK_F2)
       this->debug();
+    else if (event.type == SDLK_UP)
+      this->historyMoveUp();
+    else if (event.type == SDLK_DOWN)
+      this->historyMoveDown();
     else if (event.type == SDLK_TAB)
       this->completion->autoComplete();
Index: trunk/src/lib/shell/shell_input.h
===================================================================
--- trunk/src/lib/shell/shell_input.h	(revision 5242)
+++ trunk/src/lib/shell/shell_input.h	(revision 5243)
@@ -15,4 +15,5 @@
 // FORWARD DECLARATION
 template<class T> class tList;
+template<class T> class tIterator;
 class ShellCompletion;
 
@@ -35,4 +36,8 @@
   void setRepeatDelay(float repeatDelay, float repeatRate);
   bool executeCommand();
+
+  void historyMoveUp();
+  void historyMoveDown();
+
   void help(const char* className = "", const char* function = "");
 
@@ -44,4 +49,5 @@
    ShellCompletion*         completion;             //!< The Completion Interface.
 
+
    char*                    inputLine;              //!< the Char-Array of the Buffer @todo not needed anymore
    float                    repeatRate;             //!< The Repeat-Delay.
@@ -50,5 +56,8 @@
    int                      pressedKey;             //!< the pressed key that will be repeated.
 
-   tList<char>*             inputHistory;           //!< The history of given commands.
+   tList<char>*             history;                //!< The history of given commands.
+   tIterator<char>*         historyIT;
+   unsigned int             historyLength;          //!< The maximum length of the InputHistory.
+   bool                     historyScrolling;       //!< true if we are scrolling through the history.
 };
 
Index: trunk/src/lib/util/list.h
===================================================================
--- trunk/src/lib/util/list.h	(revision 5242)
+++ trunk/src/lib/util/list.h	(revision 5243)
@@ -348,4 +348,11 @@
     T* seekElement(const T* element);
     T* iteratorElement(const tIterator<T>* iterator);
+
+    /** another way to iterate through the list
+     * !! THIS IS NOT MEANT FOR DELETION
+     */
+    T* prevStep();
+    T* nextStep();
+    T* getCurrent();
 
   private:
@@ -514,3 +521,44 @@
 
 
+/**
+ *  use it to move through the list without interfering with the iteration
+ */
+template<class T>
+    inline T* tIterator<T>::nextStep ()
+{
+  if( unlikely(this->tmpEl == NULL || this->tmpEl->next == NULL))
+    return NULL;
+  else
+  {
+    this->tmpEl = this->tmpEl->next;
+    return tmpEl->curr;
+  }
+}
+
+
+/**
+ *  use it to move backwards through the list without interfering with the itereation
+ * @returns next list element
+ */
+template<class T>
+    inline T* tIterator<T>::prevStep ()
+{
+  if( unlikely(this->tmpEl == NULL || this->tmpEl->prev == NULL))
+    return NULL;
+  else
+  {
+    this->tmpEl = this->tmpEl->prev;
+    return tmpEl->curr;
+  }
+}
+
+template<class T>
+    inline T* tIterator<T>::getCurrent()
+{
+  if (likeley(this->tmpEl))
+    return this->tmpEl->curr;
+  else
+    return NULL;
+}
+
 #endif /* _LIST_H */
