diff options
Diffstat (limited to '')
| -rw-r--r-- | src/command/history.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/command/history.rs b/src/command/history.rs index 73be66fa..5959fc55 100644 --- a/src/command/history.rs +++ b/src/command/history.rs @@ -34,6 +34,12 @@ pub enum Cmd { }, } +fn print_list(h: &Vec<History>) { + for i in h { + println!("{}", i.command); + } +} + impl Cmd { pub fn run(&self, db: &mut Sqlite) -> Result<()> { match self { @@ -68,7 +74,12 @@ impl Cmd { Ok(()) } - Self::List { distinct } => db.list(*distinct), + Self::List { .. } => { + let history = db.list()?; + print_list(&history); + + Ok(()) + } } } } |
