diff --git a/std/n8std/Sys.cc b/std/n8std/Sys.cc index 7f7d910..51c032e 100644 --- a/std/n8std/Sys.cc +++ b/std/n8std/Sys.cc @@ -19,7 +19,12 @@ #include "n8std/Sys.hpp" #include +#include + #include +#include + +static std::map> shellMap; N8_FUNC(sys_quickShell) { if(args.size() != 1) @@ -36,3 +41,18 @@ N8_FUNC(sys_quickShell) { )) ); } + +N8_FUNC(sys_shellConnect) { + if(args.size() != 1) + throw TerminativeThrowSignal( + std::move(address), + "Expecting 1 argument, got " + + std::to_string(args.size()) + ); + + DynamicObject value = args.at(0); + std::string uuid = N8Util::generateUuid(); + + shellMap[uuid] = std::make_shared(value.toString()); + return DynamicObject(uuid); +} diff --git a/std/n8std/Sys.hpp b/std/n8std/Sys.hpp index 30160e4..83f6071 100644 --- a/std/n8std/Sys.hpp +++ b/std/n8std/Sys.hpp @@ -38,6 +38,7 @@ N8_FUNC(sys_shellForceExit); N8_FUNC(sys_shellHasExited); N8_FUNC(sys_shellExitCode); N8_FUNC(sys_shellProcessId); +N8_FUNC(sys_shellClose); N8_LIB_END