MCPcopy Create free account
hub / github.com/DFHack/dfhack / runCommand

Method runCommand

library/Core.cpp:361–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361command_result Core::runCommand(color_ostream& out, const std::string& command)
362{
363 if (!command.empty())
364 {
365 std::vector <std::string> parts;
366 Core::cheap_tokenise(command, parts);
367 if (parts.size() == 0)
368 return CR_NOT_IMPLEMENTED;
369
370 std::string first = parts[0];
371 parts.erase(parts.begin());
372
373 if (first[0] == '#')
374 return CR_OK;
375
376 std::cerr << "Invoking: " << command << std::endl;
377 return runCommand(out, first, parts);
378 }
379 else
380 return CR_NOT_IMPLEMENTED;
381}
382
383bool DFHack::is_builtin(color_ostream& con, const std::string& command)
384{

Callers 7

fIOthreadFunction · 0.80
RunCommandMethod · 0.80
internal_runCommandFunction · 0.80
hotkey_thread_fnMethod · 0.80
invoke_commandFunction · 0.80
hotkeys_cmdFunction · 0.80
resurrectFunction · 0.80

Calls 15

has_backslashesFunction · 0.85
helpFunction · 0.85
tags_helperFunction · 0.85
ls_helperFunction · 0.85
showFunction · 0.85
runLuaScriptFunction · 0.85
try_autocompleteFunction · 0.85
okMethod · 0.80
InvokeCommandMethod · 0.80
clearFunction · 0.70
typeFunction · 0.50

Tested by

no test coverage detected