gokcehan / lf

Terminal file manager
MIT License
7.79k stars 331 forks source link

Feature request: add an lfrc switch to move duplicate copy suffixes at the beginning of filename. #1759

Closed siyia2 closed 5 months ago

siyia2 commented 5 months ago

E.g.: dummy.iso -> 1~.dummy.iso , instead of the default: dummy.iso -> dummy.iso.~1

The default renaming of duplicate copies messes the file extension, which can cause problems, if for example you want to spam the same file in the same folder, while retaining it's extension and type.

DusanLesan commented 5 months ago

You can do that already by setting dupfilefmt like set dupfilefmt "%n~%f"

It makes more sense to me to add duplicate appendage after filename and before the extension. dummy.iso -> dummy1.iso. I would like to use set dupfilefmt "%b%n%e" but now I see that one is broken for dotfiles like .xprofile. I had the same issue in my scripts util function that detected such names as empty base name and all in extension [Edit] actually that looks to be fixed in the code

siyia2 commented 5 months ago

what is dupfilefmt?

DusanLesan commented 5 months ago

Please follow the link for it. It is better explained than I could

siyia2 commented 5 months ago

Alright, i see it works!!! thx again @DusanLesan! It is useful to me because i need to spam duplicate .iso files fast for testing with my program.