Is there any shortcut to reference the path of the first argument in a MV command?

后端 未结 5 569
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-16 01:07

I often find myself using mv to rename a file. E.g.

mv app/models/keywords_builder.rb app/models/keywords_generator.rb

Doing so I need to w

5条回答
  •  情话喂你
    2020-12-16 01:36

    One way is to type the first file name and a space, then press Ctrl+w to delete it. Then press Ctrl+y twice to get two copies of the file name. Then edit the second copy.

    For example,

    mv app/models/keywords_builder.rb 
    

提交回复
热议问题