Index: code/branches/consolecommands3/src/libraries/core/command/ArgumentCompleter.h
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/ArgumentCompleter.h	(revision 7232)
+++ code/branches/consolecommands3/src/libraries/core/command/ArgumentCompleter.h	(revision 7233)
@@ -38,10 +38,10 @@
     {
         public:
-            ArgumentCompleter(ArgumentCompletionList (*function) (void)) : paramCount_(0), function_0_(function) {}
-            ArgumentCompleter(ArgumentCompletionList (*function) (const std::string& param1)) : paramCount_(1), function_1_(function) {}
-            ArgumentCompleter(ArgumentCompletionList (*function) (const std::string& param1, const std::string& param2)) : paramCount_(2), function_2_(function) {}
-            ArgumentCompleter(ArgumentCompletionList (*function) (const std::string& param1, const std::string& param2, const std::string& param3)) : paramCount_(3), function_3_(function) {}
-            ArgumentCompleter(ArgumentCompletionList (*function) (const std::string& param1, const std::string& param2, const std::string& param3, const std::string& param4)) : paramCount_(4), function_4_(function) {}
-            ArgumentCompleter(ArgumentCompletionList (*function) (const std::string& param1, const std::string& param2, const std::string& param3, const std::string& param4, const std::string& param5)) : paramCount_(5), function_5_(function) {}
+            ArgumentCompleter(ArgumentCompletionList (*function) (void), bool bUseMultipleWords) : bUseMultipleWords_(bUseMultipleWords), paramCount_(0), function_0_(function) {}
+            ArgumentCompleter(ArgumentCompletionList (*function) (const std::string& param1), bool bUseMultipleWords) : bUseMultipleWords_(bUseMultipleWords), paramCount_(1), function_1_(function) {}
+            ArgumentCompleter(ArgumentCompletionList (*function) (const std::string& param1, const std::string& param2), bool bUseMultipleWords) : bUseMultipleWords_(bUseMultipleWords), paramCount_(2), function_2_(function) {}
+            ArgumentCompleter(ArgumentCompletionList (*function) (const std::string& param1, const std::string& param2, const std::string& param3), bool bUseMultipleWords) : bUseMultipleWords_(bUseMultipleWords), paramCount_(3), function_3_(function) {}
+            ArgumentCompleter(ArgumentCompletionList (*function) (const std::string& param1, const std::string& param2, const std::string& param3, const std::string& param4), bool bUseMultipleWords) : bUseMultipleWords_(bUseMultipleWords), paramCount_(4), function_4_(function) {}
+            ArgumentCompleter(ArgumentCompletionList (*function) (const std::string& param1, const std::string& param2, const std::string& param3, const std::string& param4, const std::string& param5), bool bUseMultipleWords) : bUseMultipleWords_(bUseMultipleWords), paramCount_(5), function_5_(function) {}
 
             ArgumentCompletionList operator()(const std::string& param1 = "", const std::string& param2 = "", const std::string& param3 = "", const std::string& param4 = "", const std::string& param5 = "")
@@ -66,5 +66,9 @@
             }
 
+            inline bool useMultipleWords() const
+                { return this->bUseMultipleWords_; }
+
         private:
+            bool bUseMultipleWords_;
             unsigned char paramCount_;
             ArgumentCompletionList (*function_0_) (void);
Index: code/branches/consolecommands3/src/libraries/core/command/ArgumentCompletionFunctions.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/ArgumentCompletionFunctions.cc	(revision 7232)
+++ code/branches/consolecommands3/src/libraries/core/command/ArgumentCompletionFunctions.cc	(revision 7233)
@@ -38,6 +38,7 @@
 #include "core/ConfigFileManager.h"
 #include "core/ConfigValueContainer.h"
+#include "CommandExecutor.h"
+#include "ConsoleCommand.h"
 #include "TclThreadManager.h"
-#include "ConsoleCommand.h"
 
 // Boost 1.36 has some issues with deprecated functions that have been omitted
@@ -57,54 +58,94 @@
         }
 
-        bool groupIsVisible(const std::map<std::string, _ConsoleCommand*>& group)
-        {
-            for (std::map<std::string, _ConsoleCommand*>::const_iterator it_command = group.begin(); it_command != group.end(); ++it_command)
-                if (it_command->second->isActive() && it_command->second->hasAccess() && !it_command->second->isHidden())
-                    return true;
-
-            return false;
+        namespace detail
+        {
+            bool groupIsVisible(const std::map<std::string, _ConsoleCommand*>& group, bool bOnlyShowHidden)
+            {
+                for (std::map<std::string, _ConsoleCommand*>::const_iterator it_command = group.begin(); it_command != group.end(); ++it_command)
+                    if (it_command->second->isActive() && it_command->second->hasAccess() && (!it_command->second->isHidden())^bOnlyShowHidden)
+                        return true;
+
+                return false;
+            }
+
+            ArgumentCompletionList _groupsandcommands(bool bOnlyShowHidden)
+            {
+                ArgumentCompletionList groupList;
+
+                const std::map<std::string, std::map<std::string, _ConsoleCommand*> >& commands = _ConsoleCommand::getCommands();
+                for (std::map<std::string, std::map<std::string, _ConsoleCommand*> >::const_iterator it_group = commands.begin(); it_group != commands.end(); ++it_group)
+                    if (groupIsVisible(it_group->second, bOnlyShowHidden) && it_group->first != "")
+                        groupList.push_back(ArgumentCompletionListElement(it_group->first, getLowercase(it_group->first)));
+
+                std::map<std::string, std::map<std::string, _ConsoleCommand*> >::const_iterator it_group = commands.find("");
+                if (it_group != commands.end())
+                {
+                    groupList.push_back(ArgumentCompletionListElement("", "", "\n"));
+
+                    for (std::map<std::string, _ConsoleCommand*>::const_iterator it_command = it_group->second.begin(); it_command != it_group->second.end(); ++it_command)
+                        if (it_command->second->isActive() && it_command->second->hasAccess() && (!it_command->second->isHidden())^bOnlyShowHidden)
+                            groupList.push_back(ArgumentCompletionListElement(it_command->first, getLowercase(it_command->first)));
+                }
+
+                return groupList;
+            }
+
+            ArgumentCompletionList _subcommands(const std::string& fragment, const std::string& group, bool bOnlyShowHidden)
+            {
+                ArgumentCompletionList commandList;
+
+                std::string groupLC = getLowercase(group);
+
+                std::map<std::string, std::map<std::string, _ConsoleCommand*> >::const_iterator it_group = _ConsoleCommand::getCommands().begin();
+                for ( ; it_group != _ConsoleCommand::getCommands().end(); ++it_group)
+                    if (getLowercase(it_group->first) == groupLC)
+                        break;
+
+                if (it_group != _ConsoleCommand::getCommands().end())
+                {
+                    for (std::map<std::string, _ConsoleCommand*>::const_iterator it_command = it_group->second.begin(); it_command != it_group->second.end(); ++it_command)
+                        if (it_command->second->isActive() && it_command->second->hasAccess() && (!it_command->second->isHidden())^bOnlyShowHidden)
+                            commandList.push_back(ArgumentCompletionListElement(it_command->first, getLowercase(it_command->first)));
+                }
+
+                return commandList;
+            }
         }
 
         ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(groupsandcommands)()
         {
-            ArgumentCompletionList groupList;
-
-            const std::map<std::string, std::map<std::string, _ConsoleCommand*> >& commands = _ConsoleCommand::getCommands();
-            for (std::map<std::string, std::map<std::string, _ConsoleCommand*> >::const_iterator it_group = commands.begin(); it_group != commands.end(); ++it_group)
-                if (groupIsVisible(it_group->second))
-                    groupList.push_back(ArgumentCompletionListElement(it_group->first, getLowercase(it_group->first)));
-
-            std::map<std::string, std::map<std::string, _ConsoleCommand*> >::const_iterator it_group = commands.find("");
-            if (it_group != commands.end())
-            {
-                groupList.push_back(ArgumentCompletionListElement("\n"));
-
-                for (std::map<std::string, _ConsoleCommand*>::const_iterator it_command = it_group->second.begin(); it_command != it_group->second.end(); ++it_command)
-                    if (it_command->second->isActive() && it_command->second->hasAccess() && !it_command->second->isHidden())
-                        groupList.push_back(ArgumentCompletionListElement(it_command->first, getLowercase(it_command->first)));
-            }
-
-            return groupList;
+            return detail::_groupsandcommands(false);
         }
 
         ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(subcommands)(const std::string& fragment, const std::string& group)
         {
-            ArgumentCompletionList commandList;
-
-            std::string groupLC = getLowercase(group);
-
-            std::map<std::string, std::map<std::string, _ConsoleCommand*> >::const_iterator it_group = _ConsoleCommand::getCommands().begin();
-            for ( ; it_group != _ConsoleCommand::getCommands().end(); ++it_group)
-                if (getLowercase(it_group->first) == groupLC)
-                    break;
-
-            if (it_group != _ConsoleCommand::getCommands().end())
-            {
-                for (std::map<std::string, _ConsoleCommand*>::const_iterator it_command = it_group->second.begin(); it_command != it_group->second.end(); ++it_command)
-                    if (it_command->second->isActive() && it_command->second->hasAccess() && !it_command->second->isHidden())
-                        commandList.push_back(ArgumentCompletionListElement(it_command->first, getLowercase(it_command->first)));
-            }
-
-            return commandList;
+            return detail::_subcommands(fragment, group, false);
+        }
+
+        ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(hiddengroupsandcommands)()
+        {
+            return detail::_groupsandcommands(true);
+        }
+
+        ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(hiddensubcommands)(const std::string& fragment, const std::string& group)
+        {
+            return detail::_subcommands(fragment, group, true);
+        }
+
+        ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_MULTI(command)(const std::string& fragment)
+        {
+            CommandEvaluation evaluation = CommandExecutor::evaluate(fragment);
+            const std::string& hint = evaluation.hint();
+
+            if (evaluation.getPossibleArguments().size() > 0)
+            {
+                return evaluation.getPossibleArguments();
+            }
+            else
+            {
+                ArgumentCompletionList list;
+                list.push_back(ArgumentCompletionListElement("", "", hint));
+                return list;
+            }
         }
 
Index: code/branches/consolecommands3/src/libraries/core/command/ArgumentCompletionFunctions.h
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/ArgumentCompletionFunctions.h	(revision 7232)
+++ code/branches/consolecommands3/src/libraries/core/command/ArgumentCompletionFunctions.h	(revision 7233)
@@ -39,7 +39,12 @@
 
 #define ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(functionname) \
+    _ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_INTERNAL(functionname, false)
+#define ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_MULTI(functionname) \
+    _ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_INTERNAL(functionname, true)
+
+#define _ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_INTERNAL(functionname, bUseMultipleWords) \
     ArgumentCompleter* functionname() \
     { \
-        static ArgumentCompleter completer = ArgumentCompleter(&acf_##functionname); \
+        static ArgumentCompleter completer = ArgumentCompleter(&acf_##functionname, bUseMultipleWords); \
         return &completer; \
     } \
@@ -55,4 +60,7 @@
         ARGUMENT_COMPLETION_FUNCTION_DECLARATION(groupsandcommands)();
         ARGUMENT_COMPLETION_FUNCTION_DECLARATION(subcommands)(const std::string& fragment, const std::string& group);
+        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(hiddengroupsandcommands)();
+        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(hiddensubcommands)(const std::string& fragment, const std::string& group);
+        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(command)(const std::string& fragment);
         ARGUMENT_COMPLETION_FUNCTION_DECLARATION(files)(const std::string& fragment);
         ARGUMENT_COMPLETION_FUNCTION_DECLARATION(settingssections)();
Index: code/branches/consolecommands3/src/libraries/core/command/CommandEvaluation.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/CommandEvaluation.cc	(revision 7232)
+++ code/branches/consolecommands3/src/libraries/core/command/CommandEvaluation.cc	(revision 7233)
@@ -177,5 +177,5 @@
             this->retrievePossibleArguments();
 
-        if (this->possibleArguments_.empty())
+        if (CommandEvaluation::getSize(this->possibleArguments_) == 0)
         {
             return this->string_;
@@ -184,5 +184,4 @@
         {
             std::string output = this->string_.substr(0, this->string_.find_last_of(' ') + 1);
-
             output += CommandEvaluation::getCommonBegin(this->possibleArguments_);
             return output;
@@ -234,10 +233,26 @@
             MultiType param[MAX_FUNCTOR_ARGUMENTS];
 
+            size_t max = this->hintArgumentsOffset_ + this->hintCommand_->getExecutor()->getParamCount();
+
             for (size_t i = 0; i < argumentID; ++i)
-                param[i] = this->getToken(this->getNumberOfArguments() - i - 1);
-
-            this->possibleArguments_ = (*ac)(param[0], param[1], param[2], param[3], param[4]);
-
-            CommandEvaluation::strip(this->possibleArguments_, param[0]);
+                param[i] = this->getToken(std::min(this->getNumberOfArguments(), max) - i - 1);
+
+            if (this->getNumberOfArguments() > max)
+            {
+                if (ac->useMultipleWords())
+                {
+                    std::string surplusArguments = this->tokens_.subSet(max - 1).join();
+                    if (this->string_[this->string_.size() - 1] == ' ')
+                        surplusArguments += ' ';
+
+                    this->possibleArguments_ = (*ac)(surplusArguments, param[1], param[2], param[3], param[4]);
+                    CommandEvaluation::strip(this->possibleArguments_, this->getToken(this->getNumberOfArguments() - 1));
+                }
+            }
+            else
+            {
+                this->possibleArguments_ = (*ac)(param[0], param[1], param[2], param[3], param[4]);
+                CommandEvaluation::strip(this->possibleArguments_, param[0]);
+            }
         }
     }
@@ -250,4 +265,10 @@
         {
             const std::string& entry = it->getComparable();
+
+            if (entry == "")
+            {
+                ++it;
+                continue;
+            }
 
             if (entry.size() < fragmentLC.size())
@@ -275,4 +296,13 @@
     }
 
+    /* static */ size_t CommandEvaluation::getSize(const ArgumentCompletionList& list)
+    {
+        size_t count = 0;
+        for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
+            if (it->getComparable() != "")
+                ++count;
+        return count;
+    }
+
     /* static */ std::string CommandEvaluation::dump(const ArgumentCompletionList& list)
     {
@@ -280,8 +310,8 @@
         for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
         {
-            if (it != list.begin())
+            output += it->getDisplay();
+
+            if (it->getComparable() != "")
                 output += ' ';
-
-            output += it->getDisplay();
         }
         return output;
@@ -316,14 +346,22 @@
     /* static */ std::string CommandEvaluation::getCommonBegin(const ArgumentCompletionList& list)
     {
-        if (list.size() == 0)
+        if (CommandEvaluation::getSize(list) == 0)
         {
             return "";
         }
-        else if (list.size() == 1)
-        {
-            if (list.begin()->hasDisplay())
-                return (list.begin()->getString());
-            else
-                return (list.begin()->getString() + ' ');
+        else if (CommandEvaluation::getSize(list) == 1)
+        {
+            for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
+            {
+                if (it->getComparable() != "")
+                {
+                    if (it->hasDisplay())
+                        return (it->getString());
+                    else
+                        return (it->getString() + ' ');
+                }
+            }
+
+            return "";
         }
         else
@@ -338,7 +376,11 @@
                     const std::string& argumentComparable = it->getComparable();
                     const std::string& argument = it->getString();
+
+                    if (argumentComparable == "")
+                        continue;
+
                     if (argument.size() > i)
                     {
-                        if (it == list.begin())
+                        if (tempComparable == 0)
                         {
                             tempComparable = argumentComparable[i];
Index: code/branches/consolecommands3/src/libraries/core/command/CommandEvaluation.h
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/CommandEvaluation.h	(revision 7232)
+++ code/branches/consolecommands3/src/libraries/core/command/CommandEvaluation.h	(revision 7233)
@@ -65,4 +65,7 @@
             MultiType getEvaluatedParameter(unsigned int index) const;
 
+            const ArgumentCompletionList& getPossibleArguments() const
+                { return this->possibleArguments_; }
+
         private:
             void initialize(const std::string& command);
@@ -75,4 +78,5 @@
 
             static void strip(ArgumentCompletionList& list, const std::string& fragment);
+            static size_t getSize(const ArgumentCompletionList& list);
 
             static std::string dump(const ArgumentCompletionList& list);
Index: code/branches/consolecommands3/src/libraries/core/command/CommandExecutor.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/CommandExecutor.cc	(revision 7232)
+++ code/branches/consolecommands3/src/libraries/core/command/CommandExecutor.cc	(revision 7233)
@@ -42,4 +42,10 @@
         .argumentCompleter(0, autocompletion::groupsandcommands())
         .argumentCompleter(1, autocompletion::subcommands());
+
+    _SetConsoleCommand("unhide", &CommandExecutor::unhide)
+        .argumentCompleter(0, autocompletion::hiddengroupsandcommands())
+        .argumentCompleter(1, autocompletion::hiddensubcommands())
+        .defaultValue(1, "")
+        .defaultValue(2, "");
 
     /* static */ CommandExecutor& CommandExecutor::getInstance()
@@ -149,3 +155,8 @@
         }
     }
+
+    /* static */ MultiType CommandExecutor::unhide(const std::string& group, const std::string& name, const std::string& arguments)
+    {
+        return CommandExecutor::queryMT(group + " " + name + " " + arguments);
+    }
 }
Index: code/branches/consolecommands3/src/libraries/core/command/CommandExecutor.h
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/CommandExecutor.h	(revision 7232)
+++ code/branches/consolecommands3/src/libraries/core/command/CommandExecutor.h	(revision 7233)
@@ -59,4 +59,5 @@
             static const int Denied = 4;
 
+            static MultiType unhide(const std::string& group, const std::string& name, const std::string& arguments);
             static void _autocomplete(const std::string& group, const std::string& name) {}
 
Index: code/branches/consolecommands3/src/libraries/tools/Timer.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/tools/Timer.cc	(revision 7232)
+++ code/branches/consolecommands3/src/libraries/tools/Timer.cc	(revision 7233)
@@ -39,5 +39,5 @@
 namespace orxonox
 {
-    _SetConsoleCommand("delay", &delay);
+    _SetConsoleCommand("delay", &delay).argumentCompleter(1, autocompletion::command());
     _SetConsoleCommand("killdelays", &killdelays);
 
Index: code/branches/consolecommands3/src/orxonox/gamestates/GSMainMenu.cc
===================================================================
--- code/branches/consolecommands3/src/orxonox/gamestates/GSMainMenu.cc	(revision 7232)
+++ code/branches/consolecommands3/src/orxonox/gamestates/GSMainMenu.cc	(revision 7233)
@@ -60,5 +60,5 @@
     _SetConsoleCommand(__CC_startDedicated_name,       &GSMainMenu::startDedicated ).deactivate();
     _SetConsoleCommand(__CC_startMainMenu_name,        &GSMainMenu::startMainMenu  ).deactivate();
-    _SetConsoleCommand(__CC_setMainMenuSoundPath_name, &GSMainMenu::setMainMenuSoundPath);
+    _SetConsoleCommand(__CC_setMainMenuSoundPath_name, &GSMainMenu::setMainMenuSoundPath).hide();
 
     GSMainMenu::GSMainMenu(const GameStateInfo& info)
Index: code/branches/consolecommands3/src/orxonox/gamestates/GSRoot.cc
===================================================================
--- code/branches/consolecommands3/src/orxonox/gamestates/GSRoot.cc	(revision 7232)
+++ code/branches/consolecommands3/src/orxonox/gamestates/GSRoot.cc	(revision 7233)
@@ -45,5 +45,5 @@
     static const std::string __CC_pause_name = "pause";
 
-    _SetConsoleCommand("printObjects", &GSRoot::printObjects);
+    _SetConsoleCommand("printObjects", &GSRoot::printObjects).hide();
     _SetConsoleCommand(__CC_setTimeFactor_name, &GSRoot::setTimeFactor).accessLevel(AccessLevel::Master).defaultValues(1.0);
     _SetConsoleCommand(__CC_pause_name,         &GSRoot::pause        ).accessLevel(AccessLevel::Master);
