save history to file
This commit is contained in:
parent
ec1a840bb6
commit
d7fc72e65d
2 changed files with 51 additions and 1 deletions
|
|
@ -163,6 +163,10 @@ fn rush_loop(data: &mut Data, orig: libc::termios) -> io::Result<()> {
|
|||
|
||||
fn main() {
|
||||
let mut data = Data::default();
|
||||
let home = env::home_dir().unwrap();
|
||||
let home_str = home.into_os_string().into_string().unwrap();
|
||||
data.set_hist_file(&format!("{}/.rush_history", home_str));
|
||||
data.load_history();
|
||||
|
||||
let orig = enable_raw_mode();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue