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:
parent
39e403c1d2
commit
4b554f4605
1 changed files with 23 additions and 0 deletions
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue