Index: trunk/src/util/loading/load_param.cc
===================================================================
--- trunk/src/util/loading/load_param.cc	(revision 5101)
+++ trunk/src/util/loading/load_param.cc	(revision 5102)
@@ -17,5 +17,4 @@
 
 #include "list.h"
-#include "array.h"
 #include "base_object.h"
 
@@ -386,11 +385,11 @@
  * searches for classes, which beginn with classNameBegin
  * @param classNameBegin the beginning string of a Class
- * @return a NEW char-array with ClassNames. The ARRAY should be deleted afterwards,
+ * @return a NEW char-array with ClassNames. The LIST should be deleted afterwards,
  * !! The strings MUST NOT be deleted !!
  */
-Array<char*>* LoadClassDescription::searchClassWithShort(const char* classNameBegin)
+tList<const char>* LoadClassDescription::searchClassWithShort(const char* classNameBegin)
 {
   unsigned int searchLength = strlen(classNameBegin);
-  Array<char*>* retVal = new Array<char*>;
+  tList<const char>* retVal = new tList<const char>;
 
   tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
@@ -401,5 +400,5 @@
         !strncasecmp(enumClassDesc->className, classNameBegin, searchLength))
     {
-      retVal->addEntry(enumClassDesc->className);
+      retVal->add(enumClassDesc->className);
     }
     enumClassDesc = iterator->nextElement();
@@ -407,5 +406,4 @@
   delete iterator;
 
-  retVal->finalizeArray();
   return retVal;
 }
Index: trunk/src/util/loading/load_param.h
===================================================================
--- trunk/src/util/loading/load_param.h	(revision 5101)
+++ trunk/src/util/loading/load_param.h	(revision 5102)
@@ -31,5 +31,4 @@
 // Forward Declaration //
 template<class T> class tList;
-template<class T> class Array;
 
 //! macro that makes it even more easy to load a Parameter
@@ -312,5 +311,5 @@
 
   static void printAll(const char* fileName = NULL);
-  static Array<char*>* searchClassWithShort(const char* classNameBegin);
+  static tList<const char>* searchClassWithShort(const char* classNameBegin);
 //  static const LoadParamDescription* getClass(const char* className);
 
Index: trunk/src/util/shell.cc
===================================================================
--- trunk/src/util/shell.cc	(revision 5101)
+++ trunk/src/util/shell.cc	(revision 5102)
@@ -20,5 +20,4 @@
 #include "text_engine.h"
 #include "list.h"
-#include "array.h"
 #include "graphics_engine.h"
 #include "event_handler.h"
@@ -382,6 +381,8 @@
   {
     if (this->pressedKey == event.type)
+    {
       this->pressedKey = SDLK_FIRST;
-    this->delayed = 0.0;
+      this->delayed = 0.0;
+    }
   }
 }
@@ -462,28 +463,73 @@
   }
 
-  printf("%s\n",commandBegin);
-   Array<char*>* classArray = LoadClassDescription::searchClassWithShort(commandBegin);
-   if (classArray->getCount() == 0)
-   {
-     delete[] completionLine;
-     delete classArray;
+  this->classComplete(commandBegin);
+
+   delete[] completionLine;
+}
+
+/**
+ * autocompletes a className
+ * @param classBegin the Beginning of a String to autoComplete
+ * @return true on success, false otherwise
+ */
+bool Shell::classComplete(const char* classBegin)
+{
+  if (unlikely(classBegin == NULL))
+    return false;
+  tList<const char>* classList = LoadClassDescription::searchClassWithShort(classBegin);
+  if (classList->getSize() == 0)
+  {
+    delete classList;
      //PRINTF(0)("no completion found for %s\n", commandBegin);
-     return false;
-   }
-
-   for (unsigned int i = 0; i < classArray->getCount(); i++)
-   {
-     PRINTF(0)("%s\n", classArray->getEntry(i));
-   }
-   if (classArray->getCount() == 1)
-   {
-     this->removeCharacters(strlen(commandBegin));
-     this->addCharacters(classArray->getEntry(0));
-     this->addCharacter(' ');
-   }
-
-   delete[] completionLine;
-   delete classArray;
-}
+    return false;
+  }
+
+  const char* addString = classList->firstElement();
+  unsigned int addLength = 0;
+  unsigned int inputLenght = strlen(classBegin);
+
+  if (addString != NULL)
+    addLength = strlen(addString);
+  tIterator<const char>* charIterator = classList->getIterator();
+  const char* charElem = charIterator->nextElement();
+  while (charElem != NULL)
+  {
+    PRINTF(0)("%s:: ", charElem);
+    {
+      for (unsigned int i = inputLenght; i < addLength; i++)
+        if (addString[i] != charElem[i])
+      {
+        addLength = i;
+        break;
+      }
+    }
+
+    charElem = charIterator->nextElement();
+  }
+  delete charIterator;
+
+  if (addLength >= inputLenght)
+  {
+    char* adder = new char[addLength+1];
+    strncpy(adder, addString, addLength);
+    adder[addLength] = '\0';
+    this->removeCharacters(inputLenght);
+    this->addCharacters(adder);
+//    this->addCharacters("::");
+    delete[] adder;
+  }
+  delete classList;
+}
+
+bool Shell::objectComplete(const char* objectBegin, ClassID classID)
+{
+
+}
+
+bool Shell::functionComplete(const char* functionBegin)
+{
+}
+
+
 
 /**
Index: trunk/src/util/shell.h
===================================================================
--- trunk/src/util/shell.h	(revision 5101)
+++ trunk/src/util/shell.h	(revision 5102)
@@ -67,4 +67,7 @@
   private:
     bool autoComplete();
+    bool classComplete(const char* classBegin);
+    bool objectComplete(const char* objectBegin, ClassID classID);
+    bool functionComplete(const char* functionBegin);
 
 
