Aliases work, Alt + . works, README update
This commit is contained in:
@ -59,8 +59,6 @@ impl SqishConf {
|
||||
hotkeys: hotkeys,
|
||||
};
|
||||
|
||||
println!("{:?}", out_conf);
|
||||
|
||||
out_conf.handle_rgb();
|
||||
out_conf.handle_colors();
|
||||
|
||||
|
@ -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
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user