Early work on tab completion

This commit is contained in:
2025-03-09 21:59:12 -04:00
parent 59374bf0f1
commit 1d787ad892
13 changed files with 260 additions and 43 deletions

View File

@@ -5,13 +5,16 @@ use crate::prelude::*;
pub struct MetaTab {
timer_start: Instant,
last_runtime: Option<Duration>,
path_cmds: Vec<String> // Used for command completion
}
impl MetaTab {
pub fn new() -> Self {
let path_cmds = get_path_cmds().unwrap_or_default();
Self {
timer_start: Instant::now(),
last_runtime: None,
path_cmds
}
}
pub fn start_timer(&mut self) {
@@ -23,4 +26,7 @@ impl MetaTab {
pub fn get_runtime(&self) -> Option<Duration> {
self.last_runtime
}
pub fn path_cmds(&self) -> &[String] {
&self.path_cmds
}
}