1
0
Fork 0

fix suddenly malfunctioning dupe function in LF

This commit is contained in:
Luca Bilke 2023-03-27 13:39:33 +02:00
parent 74be8750bb
commit 532db612b1
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@ cmd paste &{{
cmd dupe %{{
for file in $fx; do
find "$PWD" "$file" | grep -oP '(?<=.\.~)\d+(?=~$)' | sort -n | tail -1 | (
find "$PWD" "$file" -maxdepth 0 | grep -oP '(?<=.\.~)\d+(?=~$)' | sort -n | tail -1 | (
ext=$(($(cat /dev/stdin)+1))
filedest="$(echo "$file" | sed 's/.~[[:digit:]]*~$//').~$ext~"
cp -r "$file" "$filedest"