Index: code/branches/console/src/core/CommandEvaluation.cc
===================================================================
--- code/branches/console/src/core/CommandEvaluation.cc	(revision 1424)
+++ code/branches/console/src/core/CommandEvaluation.cc	(revision 1427)
@@ -57,4 +57,6 @@
         this->functionclass_ = 0;
         this->function_ = 0;
+        this->possibleArgument_ = "";
+        this->argument_ = "";
 
         this->errorMessage_ = "";
@@ -97,5 +99,5 @@
         if (!this->bNewCommand_)
         {
-std::cout << "ASDF" << std::endl;
+std::cout << "not new" << std::endl;
             switch (this->state_)
             {
@@ -106,14 +108,41 @@
                 case CS_ShortcutOrIdentifier:
                     if (this->function_)
-                        return CommandExecutor::complete(this->function_->getName() + " ");
+                    {
+                        if (this->function_->getParamCount() == 0)
+                            return /*CommandExecutor::complete*/(this->command_ = this->function_->getName());
+                        else
+                            return /*CommandExecutor::complete*/(this->command_ = this->function_->getName() + " ");
+                    }
                     else if (this->functionclass_)
-                        return CommandExecutor::complete(this->functionclass_->getName() + " ");
+                        return /*CommandExecutor::complete*/(this->command_ = this->functionclass_->getName() + " ");
                     break;
                 case CS_Function:
                     if (this->function_)
-                        return CommandExecutor::complete(this->functionclass_->getName() + " " + this->function_->getName() + " ");
-                    break;
+                    {
+                        if (this->function_->getParamCount() == 0)
+                            return /*CommandExecutor::complete*/(this->command_ = this->functionclass_->getName() + " " + this->function_->getName());
+                        else
+                            return /*CommandExecutor::complete*/(this->command_ = this->functionclass_->getName() + " " + this->function_->getName() + " ");
+                    }
+                    break;
+                case CS_ParamPreparation:
                 case CS_Params:
-                    break;
+                {
+                    unsigned int maxIndex = this->commandTokens_.size();
+                    if (this->command_[this->command_.size() - 1] != ' ')
+                        maxIndex -= 1;
+                    std::string whitespace = "";
+                    if (this->function_->getParamCount() > (maxIndex + 1 - this->getStartindex()))
+                        whitespace = " ";
+
+                    if (this->possibleArgument_ != "")
+                    {
+                        maxIndex -= 1;
+                        this->argument_ = this->possibleArgument_;
+                    }
+
+                    return /*CommandExecutor::complete*/(this->command_ = this->commandTokens_.subSet(0, maxIndex).join() + " " + this->argument_ + whitespace);
+                    break;
+                }
                 case CS_Finished:
                     break;
@@ -144,4 +173,5 @@
                 return CommandEvaluation::dump(this->listOfPossibleFunctions_);
                 break;
+            case CS_ParamPreparation:
             case CS_Params:
                 if (this->listOfPossibleArguments_.size() > 0)
@@ -241,5 +271,8 @@
     std::string CommandEvaluation::dump(const ConsoleCommand* command)
     {
-        std::string output = command->getName() + ": ";
+        std::string output = command->getName();
+        if (command->getParamCount() > 0)
+            output += ": ";
+
         for (unsigned int i = 0; i < command->getParamCount(); i++)
         {
Index: code/branches/console/src/core/CommandEvaluation.h
===================================================================
--- code/branches/console/src/core/CommandEvaluation.h	(revision 1424)
+++ code/branches/console/src/core/CommandEvaluation.h	(revision 1427)
@@ -46,4 +46,5 @@
         CS_ShortcutOrIdentifier,
         CS_Function,
+        CS_ParamPreparation,
         CS_Params,
         CS_Finished,
@@ -98,4 +99,6 @@
             Identifier* functionclass_;
             ConsoleCommand* function_;
+            std::string possibleArgument_;
+            std::string argument_;
 
             std::string errorMessage_;
Index: code/branches/console/src/core/CommandExecutor.cc
===================================================================
--- code/branches/console/src/core/CommandExecutor.cc	(revision 1424)
+++ code/branches/console/src/core/CommandExecutor.cc	(revision 1427)
@@ -146,5 +146,5 @@
     void CommandExecutor::parse(const std::string& command, bool bInitialize)
     {
-std::cout << "parse: command: >" << command << "<" << std::endl;
+std::cout << "parse (" << bInitialize << "): command: >" << command << "<" << std::endl;
         if (bInitialize)
             CommandExecutor::getEvaluation().initialize(command);
@@ -185,5 +185,5 @@
                     {
                         // It's a shortcut
-                        CommandExecutor::getEvaluation().state_ = CS_Params;
+                        CommandExecutor::getEvaluation().state_ = CS_ParamPreparation;
                         CommandExecutor::getEvaluation().functionclass_ = 0;
                         // Move on to next case
@@ -224,9 +224,12 @@
                             CommandExecutor::getEvaluation().bCommandChanged_ = true;
                         }
-                        CommandExecutor::getEvaluation().state_ = CS_Params;
+                        CommandExecutor::getEvaluation().state_ = CS_ParamPreparation;
                         CommandExecutor::getEvaluation().functionclass_ = 0;
                         CommandExecutor::getEvaluation().command_ = CommandExecutor::getEvaluation().function_->getName();
                         if (CommandExecutor::getEvaluation().function_->getParamCount() > 0)
+                        {
                             CommandExecutor::getEvaluation().command_ += " ";
+                            CommandExecutor::getEvaluation().bCommandChanged_ = true;
+                        }
                         // Move on to next case
                     }
@@ -263,4 +266,5 @@
                         CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(CommandExecutor::getArgument(0));
                         CommandExecutor::getEvaluation().functionclass_ = CommandExecutor::getPossibleIdentifier(CommandExecutor::getArgument(0));
+                        CommandExecutor::getEvaluation().bCommandChanged_ = true;
                         return;
                     }
@@ -280,5 +284,5 @@
                         {
                             // It's a function
-                            CommandExecutor::getEvaluation().state_ = CS_Params;
+                            CommandExecutor::getEvaluation().state_ = CS_ParamPreparation;
                             // Move on to next case
                         }
@@ -308,8 +312,11 @@
                                 CommandExecutor::getEvaluation().bCommandChanged_ = true;
                             }
-                            CommandExecutor::getEvaluation().state_ = CS_Params;
+                            CommandExecutor::getEvaluation().state_ = CS_ParamPreparation;
                             CommandExecutor::getEvaluation().command_ = CommandExecutor::getEvaluation().functionclass_->getName() + " " + CommandExecutor::getEvaluation().function_->getName();
                             if (CommandExecutor::getEvaluation().function_->getParamCount() > 0)
+                            {
                                 CommandExecutor::getEvaluation().command_ += " ";
+                                CommandExecutor::getEvaluation().bCommandChanged_ = true;
+                            }
                             // Move on to next case
                         }
@@ -327,4 +334,5 @@
                             CommandExecutor::getEvaluation().command_ = CommandExecutor::getEvaluation().functionclass_->getName() + " " + CommandExecutor::getCommonBegin(CommandExecutor::getEvaluation().listOfPossibleFunctions_);
                             CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(CommandExecutor::getArgument(1), CommandExecutor::getEvaluation().functionclass_);
+                            CommandExecutor::getEvaluation().bCommandChanged_ = true;
                             return;
                         }
@@ -333,12 +341,67 @@
                 else
                 {
-                    // There is no classname - move on to CS_Shortcut_Params
-                }
-            }
-std::cout << "Waiting for arguments" << std::endl;
+                    // There is no classname - move on to CS_ParamPreparation
+                }
+            }
+std::cout << "1\n";
+            case CS_ParamPreparation:
+std::cout << "2\n";
+            {
+                if (CommandExecutor::getEvaluation().function_->getParamCount() == 0 || CommandExecutor::enoughArgumentsGiven(CommandExecutor::getEvaluation().function_))
+                {
+                    CommandExecutor::getEvaluation().state_ = CS_Finished;
+                    return;
+                }
+                else
+                {
+                    unsigned int argumentNumber = CommandExecutor::argumentsGiven() - 1;
+                    if (CommandExecutor::getEvaluation().functionclass_)
+                        argumentNumber -= 1;
+
+                    CommandExecutor::createListOfPossibleArguments(CommandExecutor::getLastArgument(), CommandExecutor::getEvaluation().function_, argumentNumber);
+                    CommandExecutor::getEvaluation().state_ = CS_Params;
+
+                    if (CommandExecutor::getEvaluation().bCommandChanged_)
+                    {
+                        // Don't do more than one change
+                        return;
+                    }
+                }
+            }
             case CS_Params:
-            {
+std::cout << "3\n";
+            {
+                if (CommandExecutor::getEvaluation().listOfPossibleArguments_.size() == 1)
+                {
+std::cout << "3_1\n";
+                    // There is exactly one possible argument
+                    CommandExecutor::getEvaluation().argument_ = *(*CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()).second;
+                    CommandExecutor::getEvaluation().state_ = CS_ParamPreparation;
+                    return;
+                }
+                else if (CommandExecutor::getEvaluation().listOfPossibleArguments_.size() == 0)
+                {
+std::cout << "3_2\n";
+                    // The user tries something new - we let him do
+                    CommandExecutor::getEvaluation().state_ = CS_ParamPreparation;
+                    CommandExecutor::getEvaluation().argument_ = CommandExecutor::getLastArgument();
+                    return;
+                }
+                else
+                {
+std::cout << "3_3\n";
+                    // There are several possibilities
+                    unsigned int argumentNumber = CommandExecutor::argumentsGiven() - 1;
+                    if (CommandExecutor::getEvaluation().functionclass_)
+                        argumentNumber -= 1;
+
+                    CommandExecutor::getEvaluation().argument_ = CommandExecutor::getCommonBegin(CommandExecutor::getEvaluation().listOfPossibleArguments_);
+                    CommandExecutor::getEvaluation().possibleArgument_ = CommandExecutor::getPossibleArgument(CommandExecutor::getLastArgument(), CommandExecutor::getEvaluation().function_, argumentNumber);
+                    CommandExecutor::getEvaluation().state_ = CS_ParamPreparation;
+                    return;
+                }
             }
             case CS_Finished:
+std::cout << "4\n";
             {
                 // Nothing more to do
@@ -373,7 +436,7 @@
     {
         if (CommandExecutor::getEvaluation().functionclass_)
-            return (CommandExecutor::getEvaluation().commandTokens_.size() >= (2 + command->getParamCount()));
-        else
-            return (CommandExecutor::getEvaluation().commandTokens_.size() >= (1 + command->getParamCount()));
+            return (CommandExecutor::argumentsGiven() > (2 + command->getParamCount()));
+        else
+            return (CommandExecutor::argumentsGiven() > (1 + command->getParamCount()));
     }
 
@@ -388,5 +451,5 @@
     std::string CommandExecutor::getLastArgument()
     {
-        return CommandExecutor::getArgument(CommandExecutor::argumentsGiven());
+        return CommandExecutor::getArgument(CommandExecutor::argumentsGiven() - 1);
     }
 
@@ -462,10 +525,10 @@
     }
 
-    const std::string* CommandExecutor::getPossibleArgument(const std::string& name, ConsoleCommand* command, unsigned int param)
+    std::string CommandExecutor::getPossibleArgument(const std::string& name, ConsoleCommand* command, unsigned int param)
     {
         std::string lowercase = getLowercase(name);
         for (std::list<std::pair<std::string, std::string> >::const_iterator it = command->getArgumentCompletionListBegin(param); it != command->getArgumentCompletionListEnd(param); ++it)
             if ((*it).first == lowercase)
-                return &(*it).second;
+                return (*it).second;
 
         return 0;
Index: code/branches/console/src/core/CommandExecutor.h
===================================================================
--- code/branches/console/src/core/CommandExecutor.h	(revision 1424)
+++ code/branches/console/src/core/CommandExecutor.h	(revision 1427)
@@ -91,5 +91,5 @@
             static Identifier* getPossibleIdentifier(const std::string& name);
             static ConsoleCommand* getPossibleCommand(const std::string& name, Identifier* identifier = 0);
-            static const std::string* getPossibleArgument(const std::string& name, ConsoleCommand* command, unsigned int param);
+            static std::string getPossibleArgument(const std::string& name, ConsoleCommand* command, unsigned int param);
 
             static std::string getCommonBegin(const std::list<std::pair<const std::string*, const std::string*> >& list);
Index: code/branches/console/src/orxonox/objects/SpaceShip.cc
===================================================================
--- code/branches/console/src/orxonox/objects/SpaceShip.cc	(revision 1424)
+++ code/branches/console/src/orxonox/objects/SpaceShip.cc	(revision 1427)
@@ -54,7 +54,7 @@
 {
     SetConsoleCommand(SpaceShip, setMaxSpeedTest, false).setAccessLevel(AccessLevel::Debug);
-    SetConsoleCommandGeneric(test1, SpaceShip, createExecutor(createFunctor(&SpaceShip::setMaxSpeedTest), "setMaxSpeed"), false).setAccessLevel(AccessLevel::Debug);
-    SetConsoleCommandGeneric(test2, SpaceShip, createExecutor(createFunctor(&SpaceShip::setMaxSpeedTest), "setMaxBlubber"), false).setAccessLevel(AccessLevel::Debug);
-    SetConsoleCommandGeneric(test3, SpaceShip, createExecutor(createFunctor(&SpaceShip::setMaxSpeedTest), "setRofl"), false).setAccessLevel(AccessLevel::Debug);
+    SetConsoleCommandGeneric(test1, SpaceShip, createConsoleCommand(createFunctor(&SpaceShip::setMaxSpeedTest), "setMaxSpeed"), false).setAccessLevel(AccessLevel::Debug);
+    SetConsoleCommandGeneric(test2, SpaceShip, createConsoleCommand(createFunctor(&SpaceShip::setMaxSpeedTest), "setMaxBlubber"), false).setAccessLevel(AccessLevel::Debug);
+    SetConsoleCommandGeneric(test3, SpaceShip, createConsoleCommand(createFunctor(&SpaceShip::setMaxSpeedTest), "setRofl"), false).setAccessLevel(AccessLevel::Debug);
 
     CreateFactory(SpaceShip);
