summaryrefslogtreecommitdiffstats
path: root/src/local/history.rs
blob: 61438b6df7b678520e06df5fbc1cae27283a9e06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use chrono;

#[derive(Debug)]
pub struct History {
    pub timestamp: i64,
    pub command: String,
    pub cwd: String,
}

impl History {
    pub fn new(command: &str, cwd: &str) -> History {
        History {
            timestamp: chrono::Utc::now().timestamp_millis(),
            command: command.to_string(),
            cwd: cwd.to_string(),
        }
    }
}