Changeset 5195 in orxonox.OLD for trunk/src/lib/shell/shell_completion.cc
- Timestamp:
- Sep 18, 2005, 2:13:28 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell_completion.cc
r5194 r5195 108 108 if (inputSplits.getCount() == 0) 109 109 { 110 PRINTF(5)("Listing all Classes\n");111 110 completeType |= SHELLC_CLASS; 111 completeType |= SHELLC_ALIAS; 112 112 113 } 113 114 else if (inputSplits.getCount() == 1 && emptyComplete == false) 114 115 { 115 printf("trying to complete a Class with '%s'\n", inputSplits.getString(0));116 116 completeType |= SHELLC_CLASS; 117 completeType |= SHELLC_ALIAS; 117 118 } 118 119 … … 148 149 if (completeType & SHELLC_FUNCTION) 149 150 this->functionComplete(completeString, classID); 151 if (completeType & SHELLC_ALIAS) 152 this->aliasComplete(completeString); 150 153 151 154 … … 211 214 return true; 212 215 } 216 217 bool ShellCompletion::aliasComplete(const char* aliasBegin) 218 { 219 if (unlikely(aliasBegin == NULL)) 220 return false; 221 tList<const char> aliasList; 222 ShellCommandClass::getCommandListOfAlias(&aliasList); 223 //printf("%s\n", boList->firstElement()->getName()); 224 if (!this->addToCompleteList(&aliasList, aliasBegin)) 225 return false; 226 return true; 227 } 228 213 229 214 230 /**
Note: See TracChangeset
for help on using the changeset viewer.