diff --git a/README.md b/README.md index 38c9aa2..947fcf0 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ Some shortcuts are built in. They may be unique to Sqish or be copied from Zsh f * Ctrl+A : Jumps to the end of the line * Ctrl+E : Jumps to the start of the line * Ctrl+C : Clears the current line and starts a new one +* Ctrl+L : Clears the screen * Ctrl+P : Jump to the next word (kinda) * Ctrl+O : Jump to the previous word (kinda) diff --git a/src/lib.rs b/src/lib.rs index 833299c..e879cf1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -522,13 +522,6 @@ pub mod shell { } }, - Key::Ctrl('x') => { - clear_line(&max_pos, ¤t_pos); - mycommand.clear(); - current_pos = 0; - max_pos = 0; - } - Key::Left => { if current_pos > 0 { current_pos -= 1; @@ -543,6 +536,12 @@ pub mod shell { } }, + Key::Ctrl('l') => { + write!(stdout, "{}{}", termion::clear::All, termion::cursor::Goto(1,1)); + write!(stdout, "{}{}", conf.promptline, mycommand); + + }, + Key::Ctrl('p') => { let steps = find_next_space(¤t_pos, &max_pos, &mycommand); //println!("steps: {:?} cur {:?} max {:?}", steps, current_pos, max_pos);