4 ms·
> having to retype the whole filepath when using mv can lead to errors. If you use bash, or any readline-based command line (in emacs mode): mv long.file.na
by _TwoFinger 3y ago
> having to retype the whole filepath when using mv can lead to errors.
If you use bash, or any readline-based command line (in emacs mode):
mv long.file.name |^W^Y^Y
results in
mv long.file.name long.file.name |
(| is the cursor).
Then, you just edit the second copy of the filename.
BTW, M-C-b/M-C-f will move by one whole "argument" (even if it contains escaped spaces).
edit: and if your filename has spaces, replace the ^W above with M-C-b C-k