How to cancel and keep reverse-i-search?

Often I fail to find something with reverse-i-search but want to keep what I have already written. For example, typing pdflatex fails to complete to pdflatex mydocument.tex. If I then cancel it with Ctrl+c or Ctrl g, the pdflatex part is deleted as well. How can I cancel it in a way that keeps my input?

Asked By: Konrad Höffner

||

Instead of cancelling just use ALT+F (or on Ubuntu alternatively CTRL+-> to move the cursor to the end of the first word and then press CTRL+K to delete everything to the end of the line.

Now you are ready to complete your command.

Answered By: guntbert
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.