I know I can reuse the first argument from the prævious command with !:1
; but is it possible to reuse an already typed argument from the command currently being entered? Say I want to cp blablabla blablabla.bak
(and assume there are other similarly named files in the directory); it would be nice not to have to type blablabla all over again.
Yes; you can use the history expansion !#
to represent the current line so far:
cp blablabla !#:1.bak
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With