vimv icon indicating copy to clipboard operation
vimv copied to clipboard

Don't overwrite files.

Open jtagcat opened this issue 4 years ago • 2 comments

Input:

o1_foo.png
o1_bar.png
o1_baz.png
o2_baz.png

ls | wc -l # 4 vimv transform:

foo.png
bar.png
baz.png
bar.png

result:

foo.png
bar.png
baz.png

Either fail, or present the conflicted files (with possibly the original name as well, bonus points for checksum) only the second time.

jtagcat avatar Jul 27 '21 00:07 jtagcat

Yes, we need something to prevent accidentally deleting conflicted (same name) files.

uunnxx avatar Sep 05 '22 13:09 uunnxx

This also manifests when renaming a list of files that happen to share a running number. For example, from an empty test directory:

echo 01 > 01.txt
echo 02 > 02.txt
echo 03 > 03.txt

Run vimv and use Ctrl-a on each line to change 01 to 02, 02 to 03, and 03 to 04. The result will be a single file remaining in the directory called 04.txt that contains 01 because the operations were performed in order.

opello avatar Oct 29 '22 03:10 opello