Index: /trunk/src/defs/class_id.h
===================================================================
--- /trunk/src/defs/class_id.h	(revision 5189)
+++ /trunk/src/defs/class_id.h	(revision 5190)
@@ -199,4 +199,5 @@
   CL_SHELL_INPUT                =    0x00000c13,
   CL_SHELL_COMPLETION           =    0x00000c14,
+  CL_SHELL_COMMAND_ALIAS        =    0x00000c15,
 
   // Spatial Data Separation
Index: /trunk/src/lib/shell/shell_command.cc
===================================================================
--- /trunk/src/lib/shell/shell_command.cc	(revision 5189)
+++ /trunk/src/lib/shell/shell_command.cc	(revision 5190)
@@ -61,7 +61,9 @@
 }
 
-tList<const char>* ShellCommandClass::getCommandListOfClass(const char* className)
-{
-  tList<const char>* retList;
+bool ShellCommandClass::getCommandListOfClass(const char* className, tList<const char>* stringList)
+{
+  if (stringList == NULL)
+    return false;
+
   tIterator<ShellCommandClass>* iterator = ShellCommandClass::commandClassList->getIterator();
   ShellCommandClass* elem = iterator->firstElement();
@@ -74,5 +76,5 @@
       while (command != NULL)
       {
-        retList->add(command->getName());
+        stringList->add(command->getName());
         command = itFkt->nextElement();
       }
@@ -83,5 +85,5 @@
   }
   delete iterator;
-  return retList;
+  return true;
 }
 
Index: /trunk/src/lib/shell/shell_command.h
===================================================================
--- /trunk/src/lib/shell/shell_command.h	(revision 5189)
+++ /trunk/src/lib/shell/shell_command.h	(revision 5190)
@@ -43,4 +43,5 @@
 ////////////////
 class ShellCommandBase;
+class ShellCommandAlias;
 
 //! A class to hold all Classes that have (once) registered Commands.
@@ -51,5 +52,6 @@
   public:
     static const tList<ShellCommandClass>* getCommandClassList() { return ShellCommandClass::commandClassList; };
-    static tList<const char>* getCommandListOfClass(const char* className);
+    static bool ShellCommandClass::getCommandListOfClass(const char* className, tList<const char>* stringList);
+
     static ShellCommandClass* getCommandClass(const char* className);
     static void unregisterAllCommands();
@@ -67,4 +69,5 @@
     tList<ShellCommandBase>*         commandList;               //!< A list of Commands from this Class
     static tList<ShellCommandClass>* commandClassList;          //!< A list of Classes
+    static tList<ShellCommandAlias>* aliasesList;               //!< An Alias to A Command. (only for classes with one Instance)
 };
 
@@ -78,4 +81,5 @@
 
     ShellCommandBase* describe(const char* description);
+    ShellCommandBase* setAlias(const char* alias);
 
     /** @returns the CommandList of the Shell */
@@ -312,3 +316,13 @@
 };
 
+class ShellCommandAlias
+{
+  public:
+    ShellCommandAlias(const char* aliasName, ShellCommandBase* command) { this->aliasName = aliasName; this->command = command; };
+  private:
+    const char*         aliasName;
+    ShellCommandBase*   command;
+};
+
+
 #endif /* _SHELL_COMMAND_H */
Index: /trunk/src/lib/shell/shell_completion.cc
===================================================================
--- /trunk/src/lib/shell/shell_completion.cc	(revision 5189)
+++ /trunk/src/lib/shell/shell_completion.cc	(revision 5190)
@@ -68,10 +68,6 @@
   long classID;                    //< the classID retrieved from the Class.
   tList<BaseObject>* objectList;   //< the list of Objects stored in classID
-  char* classBegin;                //< the beginn of the slass string
-  char* classEnd;                  //< the end of the class string
-  char* objectBegin;               //< the begin of the object string
-  char* objectEnd;                 //< the end of the object string
-  char* functionBegin;             //< the begin of the function string
-  char* functionEnd;               //< the end of the function string
+  bool emptyComplete = false;      //< if the completion input is empty string. e.g ""
+
 
   PRINTF(4)("AutoComplete on input\n");
@@ -85,7 +81,17 @@
     return false;
   }
+
+  // Check if we are in a input. eg. the supplied string "class " and now we complete either function or object
+  if (this->input->getInput() == NULL || strlen(this->input->getInput()) == 0 ||
+      (this->input->getInput() != NULL &&
+      strrchr(this->input->getInput(), ' ') >= this->input->getInput() + strlen(this->input->getInput())-1))
+  {
+    emptyComplete = true;
+  }
+
   if (this->input->getInput() == NULL)
+  {
     return this->objectComplete("", CL_SHELL_COMMAND_CLASS);
-
+  }
 
   completionLine = this->input->getInput() + strspn(this->input->getInput(), " \t\n");
@@ -169,4 +175,5 @@
     else
       return false;
+    delete classList;
   }
   else
@@ -333,4 +340,5 @@
 }
 
+
 void ShellCompletion::emptyCompletionList()
 {
