MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / get_prompt

Function get_prompt

deps/lua/src/lua.c:153–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151
152
153static const char *get_prompt (lua_State *L, int firstline) {
154 const char *p;
155 lua_getfield(L, LUA_GLOBALSINDEX, firstline ? "_PROMPT" : "_PROMPT2");
156 p = lua_tostring(L, -1);
157 if (p == NULL) p = (firstline ? LUA_PROMPT : LUA_PROMPT2);
158 lua_pop(L, 1); /* remove global */
159 return p;
160}
161
162
163static int incomplete (lua_State *L, int status) {

Callers 1

pushlineFunction · 0.85

Calls 1

lua_getfieldFunction · 0.85

Tested by

no test coverage detected