Skip to main content
3 of 3
try to improve language
Matthias Braun
  • 8.8k
  • 8
  • 51
  • 63

How to repeat currently typed in parameter on Bash console?

I was just typing something along the lines of:

mv foo/bar/poit/zoid/narf.txt

Suddenly I realized, damn, I have to type large parts of that parameter again:

mv foo/bar/poit/zoid/narf.txt foo/bar/poit/zoid/troz.txt

Even with tab completion, that's quite a pain. I know I can copy-paste the parameter by mouse-selecting the text and middleclicking but that is not good enough. I want to keep my hands on the keyboard.

Is there a way to copy-paste the current parameter of the line using the keyboard?

k0pernikus
  • 16.7k
  • 22
  • 63
  • 82