add basic tab completion to console

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk committed 2024-07-07 06:24:08 +00:00
1 parent b31e81a469
commit 5254eb4f72
4 files changed
+134 -52

No files matched your search

+12
View File
@@ -30,6 +30,12 @@ mod_dtor! {}
/// Install the admin command handler
#[allow(clippy::let_underscore_must_use)]
pub async fn init() {
_ = services()
.admin
.complete
.write()
.expect("locked for writing")
.insert(handler::complete);
_ = services().admin.handle.lock().await.insert(handler::handle);
}
@@ -37,6 +43,12 @@ pub async fn init() {
#[allow(clippy::let_underscore_must_use)]
pub async fn fini() {
_ = services().admin.handle.lock().await.take();
_ = services()
.admin
.complete
.write()
.expect("locked for writing")
.take();
}
#[cfg(test)]