joshuto 0.9.6

Terminal file manager inspired by ranger
use rustyline::history::{History, MemHistory};

pub struct CommandLineContext {
    history: MemHistory,
}

impl std::default::Default for CommandLineContext {
    fn default() -> Self {
        Self {
            history: MemHistory::new(),
        }
    }
}

impl CommandLineContext {
    pub fn new() -> Self {
        Self::default()
    }

    pub fn history_ref(&self) -> &dyn History {
        &self.history
    }
    pub fn history_mut(&mut self) -> &mut dyn History {
        &mut self.history
    }
}