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

Function getCommandHistory

library/LuaApi.cpp:1284–1292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1282}
1283
1284static int getCommandHistory(lua_State *state)
1285{
1286 string id = luaL_checkstring(state, 1);
1287 string src_file = luaL_checkstring(state, 2);
1288 vector<string> entries;
1289 ensureCommandHistory(id, src_file)->getEntries(entries);
1290 Lua::PushVector(state, entries);
1291 return 1;
1292}
1293
1294static void addCommandToHistory(string id, string src_file,
1295 string command) {

Callers

nothing calls this directly

Calls 3

ensureCommandHistoryFunction · 0.85
PushVectorFunction · 0.85
getEntriesMethod · 0.80

Tested by

no test coverage detected