Aliases work, Alt + . works, README update

This commit is contained in:
Justine
2023-02-19 19:28:01 +01:00
parent 3f4d13769e
commit 08f80a57c1
5 changed files with 59 additions and 97 deletions

View File

@ -59,8 +59,6 @@ impl SqishConf {
hotkeys: hotkeys,
};
println!("{:?}", out_conf);
out_conf.handle_rgb();
out_conf.handle_colors();

View File

@ -101,3 +101,19 @@ pub fn treat_history_callback(line: &str) -> Option<String> {
get_hist_from_number(&mynbr)
}
pub fn get_prev_arg() -> Option<String> {
let nbr = get_history_number();
match nbr {
Ok(r) => {
let prev_cmd = get_hist_from_number(&r).unwrap_or(String::new());
let last_arg = prev_cmd.split_whitespace().last().unwrap();
return Some(String::from(last_arg));
},
Err(_) => {
return None
},
};
}