Early work on tab completion
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user