Index: /trunk/src/lib/shell/shell_command.cc
===================================================================
--- /trunk/src/lib/shell/shell_command.cc	(revision 7420)
+++ /trunk/src/lib/shell/shell_command.cc	(revision 7421)
@@ -298,93 +298,4 @@
     }
     return false;
-
-
-    /*
-    long classID = CL_NULL;                      //< the classID retrieved from the Class.
-    ShellCommandClass* commandClass = NULL;      //< the command class this command applies to.
-    const std::list<BaseObject*>* objectList = NULL;   //< the list of Objects stored in classID
-    BaseObject* objectPointer = NULL;            //< a pointer to th Object to Execute the command on
-    //    bool emptyComplete = false;                  //< if the completion input is empty string. e.g ""
-    //  long completeType = SHELLC_NONE;           //< the Type we'd like to complete.
-
-
-
-    // if we only have one input (!MUST BE AN ALIAS)
-    // CHECK FOR ALIAS
-    std::vector<ShellCommandAlias*>::const_iterator alias;
-    for (alias = ShellCommandAlias::getAliases().begin(); alias != ShellCommandAlias::getAliases().end(); alias++ )
-    {
-      if (inputSplits.getString(0) == (*alias)->getName() && (*alias)->getCommand() != NULL &&
-          (*alias)->getCommand()->shellClass != NULL )
-      {
-        objectList = ClassList::getList((*alias)->getCommand()->shellClass->getName());
-        if (objectList != NULL)
-        {
-          (*(*alias)->getCommand()->executor)(objectList->front(), inputSplits.getSubSet(1).join());
-          return true;
-        }
-      }
-    }
-
-    // looking for a Matching Class (in the First Argument)
-    std::vector<ShellCommandClass*>::iterator commandClassIT;
-    for (commandClassIT = ShellCommandClass::commandClassList.begin(); commandClassIT != ShellCommandClass::commandClassList.end(); commandClassIT++)
-    {
-      if (inputSplits[0] == (*commandClassIT)->getName())
-      {
-        //elemCL->getName();
-        classID = ClassList::StringToID((*commandClassIT)->getName());
-        commandClass = (*commandClassIT);
-        objectList = ClassList::getList((ClassID)classID);
-        break;
-      }
-    }
-
-    // Second Agument. (either Object, or Function)
-    if (commandClass != NULL && inputSplits.size() >= 2)
-    {
-      int fktPos = 1; // The position of the Function (either at pos 1(if object given), or 2)
-      // If we have an ObjectList.
-      if (objectList != NULL)
-      {
-        // Checking for a Match in the Objects of classID (else take the first)
-        std::list<BaseObject*>::const_iterator object;
-        for (object = objectList->begin(); object != objectList->end(); object++)
-        {
-          if ((*object)->getName() != NULL && inputSplits[1] == (*object)->getName())
-          {
-            /// TODO make this work for multiple Objects at once.
-            objectPointer = (*object);
-            fktPos = 2;
-            break;
-          }
-        }
-
-        // if we did not find an Object with matching name, take the first.
-        if (objectPointer == NULL)
-          objectPointer = objectList->front();
-      }
-
-      // match a function.
-      if (commandClass != NULL && (fktPos == 1 || (fktPos == 2 && inputSplits.size() >= 3)))
-      {
-        std::vector<ShellCommand*>::iterator cmdIT;
-        for (cmdIT = commandClass->commandList.begin(); cmdIT != commandClass->commandList.end(); cmdIT++)
-        {
-          if (inputSplits[fktPos] == (*cmdIT)->getName())
-          {
-            if (objectPointer == NULL && (*cmdIT)->executor->getType() & Executor_Objective)
-              return false;
-            else
-            {
-              (*(*cmdIT)->executor)(objectPointer, inputSplits.getSubSet(fktPos+1).join()); /// TODO CHECK IF OK
-              return true;
-            }
-          }
-        }
-      }
-    }
-    return false;
-    */
   }
 
Index: /trunk/src/lib/shell/shell_completion.cc
===================================================================
--- /trunk/src/lib/shell/shell_completion.cc	(revision 7420)
+++ /trunk/src/lib/shell/shell_completion.cc	(revision 7421)
@@ -100,13 +100,14 @@
 
     // Looking for ParameterCompletions.
-    if (completeType == NullCompletion)
-    {
-      unsigned int parameterBegin = parameterBegin;
+    {
+      unsigned int parameterBegin;
       if ((command = ShellCommand::getCommandFromInput(inputSplits, parameterBegin)) != NULL)
+      {
         completeType |= ParamCompletion;
-      if (emptyComplete)
-        completeParam = inputSplits.size() - parameterBegin;
-      else
-        completeParam = inputSplits.size() - parameterBegin - 1;
+        if (emptyComplete)
+          completeParam = inputSplits.size() - parameterBegin;
+        else
+          completeParam = inputSplits.size() - parameterBegin - 1;
+      }
     }
 
@@ -315,15 +316,15 @@
     switch (type)
     {
-      default:// SHELLC_NONE
+        default:// SHELLC_NONE
         return typeNames[0];
-      case  ClassCompletion:
+        case  ClassCompletion:
         return typeNames[1];
-      case ObjectCompletion:
+        case ObjectCompletion:
         return typeNames[2];
-      case FunctionCompletion:
+        case FunctionCompletion:
         return typeNames[3];
-      case AliasCompletion:
+        case AliasCompletion:
         return typeNames[4];
-      case ParamCompletion:
+        case ParamCompletion:
         return typeNames[5];
     }
