It sounds like you are looking for some help using readline and bash, here is an insane list of keyboard stuff modified from: http://www.math.utah.edu/docs/info/features_7.html#SEC45
Ctrla Move to the start of the line.
Ctrle Move to the end of the line.
Escf Move forward a word.
Escb Move backward a word.
Ctrll Clear the screen, reprinting the current line at the top.
Ctrlk Kill the text from the current cursor position to the end of the line.
Escd Kill from the cursor to the end of the current word, or if between words, to the end of the next word.
EscDel Kill from the cursor the start of the previous word, or if between words, to the start of the previous word.
Ctrlw Kill from the cursor to the previous whitespace. This is different than EscDelCtrla because the word boundaries differ.
Ctrld Delete the character underneath the cursor.
Ctrl_ Undo the last thing that you did. You can undo all the way back to an empty line.
And, here is how to yank the text back into the line. Yanking means to copy the most-recently-killed text from the kill buffer.
Ctrly Yank the most recently killed text back into the buffer at the cursor.
Escy Rotate the kill-ring, and yank the new top. You can only do this if the prior command is Ctrly or Escy.