0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-16 23:10:54 +01:00

modules/console: Add ctx term cmd.

This commit is contained in:
Jason Volk 2018-05-19 17:07:40 -07:00
parent 39e403c1d2
commit 4b554f4605

View file

@ -754,6 +754,29 @@ console_cmd__ctx__interrupt(opt &out, const string_view &line)
return true; return true;
} }
bool
console_cmd__ctx__term(opt &out, const string_view &line)
{
const params param{line, " ",
{
"id",
}};
const uint64_t ctxid
{
param.at<uint64_t>(0)
};
for(auto *const &ctx : ctx::ctxs)
if(id(*ctx) == ctxid)
{
terminate(*ctx);
break;
}
return true;
}
bool bool
console_cmd__ctx__list(opt &out, const string_view &line) console_cmd__ctx__list(opt &out, const string_view &line)
{ {