2020-10-04 17:59:28 -06:00
|
|
|
use chrono;
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct History {
|
|
|
|
pub timestamp: i64,
|
|
|
|
pub command: String,
|
|
|
|
pub cwd: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl History {
|
2020-10-05 10:20:48 -06:00
|
|
|
pub fn new(command: String, cwd: String) -> History {
|
2020-10-04 17:59:28 -06:00
|
|
|
History {
|
|
|
|
timestamp: chrono::Utc::now().timestamp_millis(),
|
2020-10-05 10:20:48 -06:00
|
|
|
command,
|
|
|
|
cwd,
|
2020-10-04 17:59:28 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|