@@ -212,6 +212,14 @@ impl Prompt {
212212 self.completion = (self.completion_fn)(&self.line);
213213 }
214214
215+ pub fn delete_char_forwards(&mut self) {
216+ let pos = self.eval_movement(Movement::ForwardChar(1));
217+ self.line.replace_range(self.cursor..pos, "");
218+
219+ self.exit_selection();
220+ self.completion = (self.completion_fn)(&self.line);
221+ }
222+
215223 pub fn delete_word_backwards(&mut self) {
216224 let pos = self.eval_movement(Movement::BackwardWord(1));
217225 self.line.replace_range(pos..self.cursor, "");
@@ -221,6 +229,15 @@ impl Prompt {
221229 self.completion = (self.completion_fn)(&self.line);
222230 }
223231
232+ pub fn kill_to_start_of_line(&mut self) {
233+ let pos = self.eval_movement(Movement::StartOfLine);
234+ self.line.replace_range(pos..self.cursor, "");
235+ self.cursor = pos;
236+
237+ self.exit_selection();
238+ self.completion = (self.completion_fn)(&self.line);
239+ }
240+
224241 pub fn kill_to_end_of_line(&mut self) {
225242 let pos = self.eval_movement(Movement::EndOfLine);
226243 self.line.replace_range(self.cursor..pos, "");
@@ -472,12 +489,31 @@ impl Component for Prompt {
472489 modifiers: KeyModifiers::CONTROL,
473490 } => self.kill_to_end_of_line(),
474491 KeyEvent {
492+ code: KeyCode::Char('u'),
493+ modifiers: KeyModifiers::CONTROL,
494+ } => self.kill_to_start_of_line(),
495+ KeyEvent {
496+ code: KeyCode::Char('h'),
497+ modifiers: KeyModifiers::CONTROL,
498+ }
499+ | KeyEvent {
475500 code: KeyCode::Backspace,
476501 modifiers: KeyModifiers::NONE,
477502 } => {
478503 self.delete_char_backwards();
479504 (self.callback_fn)(cx, &self.line, PromptEvent::Update);
480505 }
506+ KeyEvent {
507+ code: KeyCode::Char('d'),
508+ modifiers: KeyModifiers::CONTROL,
509+ }
510+ | KeyEvent {
511+ code: KeyCode::Delete,
512+ modifiers: KeyModifiers::NONE,
513+ } => {
514+ self.delete_char_forwards();
515+ (self.callback_fn)(cx, &self.line, PromptEvent::Update);
516+ }
481517 KeyEvent {
482518 code: KeyCode::Char('s'),
483519 modifiers: KeyModifiers::CONTROL,