- Timestamp:
- Apr 27, 2006, 9:31:43 PM (19 years ago)
- Location:
- trunk/src/lib/shell
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell_command.cc
r7408 r7409 114 114 if (likely(checkClass != NULL)) 115 115 { 116 printf("TEST\n"); 116 117 std::vector<ShellCommand*>::const_iterator elem; 117 118 for (elem = checkClass->commandList.begin(); elem != checkClass->commandList.end(); elem++) 118 {119 119 if (commandName == (*elem)->getName()) 120 120 { … … 122 122 return (*elem); 123 123 } 124 } 125 return NULL; 126 } 127 else 128 return NULL; 124 } 125 return NULL; 129 126 } 130 127 -
trunk/src/lib/shell/shell_command.h
r7408 r7409 75 75 static bool exists(const std::string& commandName, const std::string& className); 76 76 77 const ShellCommandClass* const getCommandClass() const { return this->shellClass; }; 78 const ShellCommandAlias* const getAlias() const { return this->alias; } 77 79 unsigned int getParamCount() const { return this->executor->getParamCount(); } 78 80 const CompletorPlugin* const getCompletorPlugin(unsigned int i) const { return this->completors[i]; }; -
trunk/src/lib/shell/shell_completion.cc
r7408 r7409 105 105 this->objectComplete(completeString, classID); 106 106 if (completeType & FunctionCompletion) 107 this->commandComplete(completeString, inputSplits .getString(0));107 this->commandComplete(completeString, inputSplits[0]); 108 108 if (completeType & AliasCompletion) 109 109 this->aliasComplete(completeString); … … 111 111 if (completeType == NullCompletion) 112 112 { 113 printf("Completing a Parameter\n"); 114 // ShellCommand:: 113 const ShellCommand* sc = ShellCommand::getCommand(inputSplits[2], inputSplits[0]); 114 if (sc != NULL) 115 { 116 std::vector<std::string> test; 117 sc->getCompletorPlugin(0)->addToCompleteList(test, inputSplits[inputSplits.size()-1]); 118 } 115 119 } 116 120 -
trunk/src/lib/shell/shell_completion_plugin.cc
r7407 r7409 33 33 void CompletorDefault::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin) const 34 34 { 35 PRINT(0)(" %s", MultiType::MultiTypeToString(this->_value->getType()).c_str());35 PRINT(0)("Requires '%s'\n", MultiType::MultiTypeToString(this->_value->getType()).c_str()); 36 36 } 37 37
Note: See TracChangeset
for help on using the changeset viewer.